Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF command in MS Project

Status
Not open for further replies.

18121999

Technical User
May 27, 2002
22
0
0
GB
Hi, I wonder if someone could help me. I apologise in advance for the garbled explanation. I would like to create an IIF formula thst could help achieve what I've described below.

I have several columns in my plan and need to create a new column that would contain values already existent in some other columns.

1st column contains a value, let's call that AB, could be BC, CD or several other options (at least 10 to 15 of then)

2nd column also contains values, let's call this EF, FG, GH. Again this has about 10 to 15 variants.

I then want my new column to be populated with a value from a list of about 10 to 15 options in a lookup table.

To be clear, it's not just a simple concatenation. I need to list all the possible variants and want the new column auto filled with the correct option from the lookup table.
I'm hoping I can get some help with using the IF formula (I'm not good with these at all) to create statements such as "IF 1st column = AB (I'd need to know how to point it to the right columns) and 2nd column = CD then select WXYZ from lookup table in new column.

Hope this is a bit clear. Thank you.
 
Hi,

I'd code a function in Project VBA. But seems you may have an aversion to VBA.

I do not believe that it is possible to nest 8 or more IIF() functions.

Apparently the SWITCH() function is available. Let me take a try. I'll start with a abridged form, which you ought to be able to expand. I tested a version of this in Excel VBA with success...
[tt]
ROW2: =SWITCH((A2="AB" AND B2="CD"),"RESULT1",(A2="AC" AND B2="DC"),"RESULT2")
[/tt]

General syntax...
[tt]
=Switch(expr-1, value-1, [ expr-2, value-2…, [ expr-n, value-n ]])
[/tt]

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Skip, my aversion to vba is borne of lack of ability 😁. I just can't seem to get it.
 
Thanks, I'll try this out this morning.
 
Skip, you're simply fab. That worked, thank you ever so much. I'm so appreciative 👍🏽
 
Well it was a stab-in-the-dark. I assumed that the VBA syntax would mirror the Project formula syntax. Glad you have a workable solution.

Would you please post your completed solution for the edification of other Tek-Tip members?

Likewise, would you also post your completed solution in thread68-1795385, where you originally posted.


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Sure, I'll do that once I finish and document the solution. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top