S
SmokingMirror
I'm experiencing some troubles with the evil IF command, and Excel's i
built help isn't especially...well, helpful, so I'm hoping you lovel
people here can come to my aid.
_Background_
Ok, I have a table of data, which allows the user to input 3 sets o
numbers, one in each cell. Let's call these A, B, and C.
Through a complex formula the data in cells A-C is manipulated t
result in a number finally appearing in cell D, which the user canno
alter. This part of the worksheet is fine, and runs as it should.
_Problem_
Now, what I'm trying to get the sheet to do is take the final figure i
cell D, and, using the variables below, automatically fill out a ne
cell (cell E):
If cell D equals 0-6 then cell E should automatically read 30
If cell D equals 7-12 then cell E should automatically read 15
If cell D equals 13-48 then cell E should automatically read 10
If cell D equals 49-90 then cell E should automatically read 5
If cell D equals 91-120 then cell E should automatically read 1
If cell D is grater than 120 then cell E should automatically read 0
I can use the IF command to work between two variables, but not the 6
require. I've studied the multiple IF variables example in the hel
menu, but everytime I replicate it, it doesn't work.
The formula that I'm using, which exists in Cell E, is as follows:
IF(CellD>0,"30",IF(CellD>6,"15",IF(CellD>12,"10",IF(CellD>48,"10",IF(CellD>90,"5",IF(CellD>120,"1","0"))))))
Using this formula Cell E reads 0 when Cell D reads 0, which is fine.
If Cell D reads greater than 1, Cell E reads 30, which is also fine.
However, nomatter what Cell D reads, if it is greater than 0, Cell
always reads 30. I understand the logic behind the problem, I jus
don't see how to fix it! Please, where am I going wrong!
built help isn't especially...well, helpful, so I'm hoping you lovel
people here can come to my aid.
_Background_
Ok, I have a table of data, which allows the user to input 3 sets o
numbers, one in each cell. Let's call these A, B, and C.
Through a complex formula the data in cells A-C is manipulated t
result in a number finally appearing in cell D, which the user canno
alter. This part of the worksheet is fine, and runs as it should.
_Problem_
Now, what I'm trying to get the sheet to do is take the final figure i
cell D, and, using the variables below, automatically fill out a ne
cell (cell E):
If cell D equals 0-6 then cell E should automatically read 30
If cell D equals 7-12 then cell E should automatically read 15
If cell D equals 13-48 then cell E should automatically read 10
If cell D equals 49-90 then cell E should automatically read 5
If cell D equals 91-120 then cell E should automatically read 1
If cell D is grater than 120 then cell E should automatically read 0
I can use the IF command to work between two variables, but not the 6
require. I've studied the multiple IF variables example in the hel
menu, but everytime I replicate it, it doesn't work.
The formula that I'm using, which exists in Cell E, is as follows:
IF(CellD>0,"30",IF(CellD>6,"15",IF(CellD>12,"10",IF(CellD>48,"10",IF(CellD>90,"5",IF(CellD>120,"1","0"))))))
Using this formula Cell E reads 0 when Cell D reads 0, which is fine.
If Cell D reads greater than 1, Cell E reads 30, which is also fine.
However, nomatter what Cell D reads, if it is greater than 0, Cell
always reads 30. I understand the logic behind the problem, I jus
don't see how to fix it! Please, where am I going wrong!