If and Switch logical statements

J

jp

Hi,

I'm wondering if anyone knows of any tutorials for how to
use the If and Switch statement in MS-project. I'm looking
at it but it doesn't make sense to me. Does someone have
a tutorial somewhere?

-JP
 
J

jp

Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting [field_name]
in the formula. Also, when one uses the if statement only custom
fields can be manipulated? How about built-in fields, can they be manipulate?

-jp
 
R

Rob Schneider

A great way to learn about VBA in Project, especially the object model
and how to reference the project "objects" is to read Rod Gill's book:
http://www.amazon.co.uk/Programming...486&linkCode=wsw&tag=0019030-21&creative=8898

Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting [field_name]
in the formula. Also, when one uses the if statement only custom
fields can be manipulated? How about built-in fields, can they be manipulate?

-jp

Jack Dahlgren MVP said:
 
J

Jack Dahlgren MVP

Switch is pretty much like a case statement. I rarely switch. Iif statements
can read any field associated with the related object (task, resource)
including built-in fields. But you can not use a formula in place of those
built in fields. They just return a value to the field they are in. So if
your formula is in Text1 it can read values from all other fields, but the
result of the formula will always be returned to Text1

-Jack Dahlgren



jp said:
Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting [field_name]
in the formula. Also, when one uses the if statement only custom
fields can be manipulated? How about built-in fields, can they be
manipulate?

-jp

Jack Dahlgren MVP said:
 
R

Rod Gill

Thank you kindly for the recommendation! If you're going to the Project
Conference I owe you a beer!

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Rob Schneider said:
A great way to learn about VBA in Project, especially the object model and
how to reference the project "objects" is to read Rod Gill's book:
http://www.amazon.co.uk/Programming...486&linkCode=wsw&tag=0019030-21&creative=8898

Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting [field_name]
in the formula. Also, when one uses the if statement only custom
fields can be manipulated? How about built-in fields, can they be
manipulate?

-jp "Jack Dahlgren MVP said:
I have some information about it here:

http://zo-d.com/blog/archives/programming/microsoft-project-tip-formulas-and-the-iif-statement.html

-Jack Dahlgren


Hi,

I'm wondering if anyone knows of any tutorials for how to
use the If and Switch statement in MS-project. I'm looking
at it but it doesn't make sense to me. Does someone have
a tutorial somewhere?

-JP
 
J

JulieS

Hello jp,

In addition to the suggestions offered by others, if you have Access
available, try searching the help in Access for the IIF and Switch
functions.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project

jp said:
Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting [field_name]
in the formula. Also, when one uses the if statement only custom
fields can be manipulated? How about built-in fields, can they be
manipulate?

-jp

Jack Dahlgren MVP said:
 
R

Rob Schneider

Rod said:
Thank you kindly for the recommendation! If you're going to the Project
Conference I owe you a beer!

Yes, I'll be there. Accept the offer.
 
J

jp

Thank you all for your recommendations.
I will look at the book, search ms-access and try things again.
Thank you:

Jack Dahlgren
Rob Schneider
Rod Gill
Julie

-jp


Jack Dahlgren MVP said:
Switch is pretty much like a case statement. I rarely switch. Iif statements
can read any field associated with the related object (task, resource)
including built-in fields. But you can not use a formula in place of those
built in fields. They just return a value to the field they are in. So if
your formula is in Text1 it can read values from all other fields, but the
result of the formula will always be returned to Text1

-Jack Dahlgren



jp said:
Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting [field_name]
in the formula. Also, when one uses the if statement only custom
fields can be manipulated? How about built-in fields, can they be
manipulate?

-jp

Jack Dahlgren MVP said:
I have some information about it here:

http://zo-d.com/blog/archives/programming/microsoft-project-tip-formulas-and-the-iif-statement.html

-Jack Dahlgren



Hi,

I'm wondering if anyone knows of any tutorials for how to
use the If and Switch statement in MS-project. I'm looking
at it but it doesn't make sense to me. Does someone have
a tutorial somewhere?

-JP
 
J

JulieS

You're welcome jp. If you still have troubles, drop back by and let
us know what you've tried and what you wish to accomplish.
Julie
jp said:
Thank you all for your recommendations.
I will look at the book, search ms-access and try things again.
Thank you:

Jack Dahlgren
Rob Schneider
Rod Gill
Julie

-jp


Jack Dahlgren MVP said:
Switch is pretty much like a case statement. I rarely switch. Iif
statements
can read any field associated with the related object (task,
resource)
including built-in fields. But you can not use a formula in place
of those
built in fields. They just return a value to the field they are
in. So if
your formula is in Text1 it can read values from all other
fields, but the
result of the formula will always be returned to Text1

-Jack Dahlgren



jp said:
Thank you Jack.
It looks like you cover - to some degree, the IF statment.
How about the Switch statement?

Can onereference any field in ms project by putting
[field_name]
in the formula. Also, when one uses the if statement only
custom
fields can be manipulated? How about built-in fields, can they
be
manipulate?

-jp

:

I have some information about it here:

http://zo-d.com/blog/archives/programming/microsoft-project-tip-formulas-and-the-iif-statement.html

-Jack Dahlgren



Hi,

I'm wondering if anyone knows of any tutorials for how to
use the If and Switch statement in MS-project. I'm looking
at it but it doesn't make sense to me. Does someone have
a tutorial somewhere?

-JP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top