If index #1 is

Closed
laithis - Mar 14, 2010 at 07:39 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 15, 2010 at 09:52 AM
Hello,

Is there a way to populate a cell with a value, provided two user-generated conditions are met?

The user chooses condition 1 and condition 2, and the result is generated in the cell.

Example:

In the table below, I want to be able to get Excel to populate a cell with the number .98 if the condition is that Machine 3 and chamber C are chosen:

Machine / Chamber Used In Machine
/ A / B / C
1 / 1.00 / 1.01 / 0.997
2 / 1.02 / .98 / .99
3 / 1.04 / 1.00 / .98

How would I do that? Seems to me that it should be something like:

IF (machine 1) and (Chamber A) then (1.00)
IF (machine 2) and (Chamber A) then (1.02)
IF (machine 3) and (Chamber A) then (1.04)
IF (machine 1) and (Chamber B) then (1.01)
IF (machine 2) and (Chamber B) then (.98) etc....

I'm pretty much a novice - and have been beating my head against the proverbial wall for over a week now....
any help would be appreciated!

Thank you,

Lisa
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 15, 2010 at 09:52 AM
Well i am relieved to know that it was only the proverbial wall and not the real one :P~

now to the side business of code, the general idea would be

=IF(AND(A1="machine 1",B1="chamber A"),1,IF(AND(A1="machine 2",B1="Chamber A"),1.02,IF(AND(A1="machine 3",B1="Chamber A"),1.04,IF(AND(A1="machine 1",B1="chamber B"),1,IF(AND(A1="machine 2",B1="Chamber B"),1.02,IF(AND(A1="machine 3",B1="Chamber B"),1.04,"end of rainbow"))))))


However beside a nightmare to understand, there cannot be more than 7 nested IF. So how many "IFs" are we talking about here. If upto 7, this will work other wise you have to resort of function
0