Too Many IF Statements in one formula problem?
Posted by Sun Shine on June 09, 2000 3:35 PM
I am having a problem with IF statements. Are you only allowed to have so many IF statements in the same formula? If youre only allowed so many how can you get around the problem?
Here is my problem: I want to enter various alpha-numeric coordinates (to a maximum of 15 possibilities) into a cell and have a value appear in another cell based on the particular alpha-numeric coordinate that I enter into the cell.
For example, I want to be able to enter B6 into cell A4 and have a value of 100 to appear in cell E2, and if say I entered D4 into cell A4 then I want a value of 200 to appear in cell E2, and if say I entered H6 into cell A4 then I want a value of 300 to appear in cell E2, and so on, up to about 15 possible combinations. So I tried the following formula entered in cell E2:
=IF(A4=B6,100,IF(A4=D4,200,IF(A4=H6,300)))
This formula works fine for up to about 6 or 7 IFs, but after about 7 possibilities it says error in formula. Does anyone know how I could put more than 7 IF statements in one formula? Or solve my problem some other way?
Thank you.