ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   FORMULA (https://www.excelbanter.com/excel-discussion-misc-queries/50243-formula.html)

Fran

FORMULA
 
I need to write an if then statement that contains more than 7 nested levels
how do I do that. So far I have:

=IF(D375,"3.350",IF(D370,"2.034",IF(D365,"1.152 ",IF(D360,".738",IF(D355,".630",IF(D350,".387", IF(D345,".252",IF(D340,".153",".063"))))))))

which works, but soon as I add another IF statement it gives me an error
message.
I need to add 2 more IF statements for this formula to work....

Thanks

Anne Troy

Hi, Fran. If you set up a table for your values and use VLOOKUP, you can
easily change the values later in the table without having to update your
formula. See:
http://www.officearticles.com/excel/...soft_excel.htm
************
Anne Troy
www.OfficeArticles.com

"Fran" wrote in message
...
I need to write an if then statement that contains more than 7 nested
levels
how do I do that. So far I have:

=IF(D375,"3.350",IF(D370,"2.034",IF(D365,"1.152 ",IF(D360,".738",IF(D355,".630",IF(D350,".387", IF(D345,".252",IF(D340,".153",".063"))))))))

which works, but soon as I add another IF statement it gives me an error
message.
I need to add 2 more IF statements for this formula to work....

Thanks




Fran

Thanks I'll check it out.

"Anne Troy" wrote:

Hi, Fran. If you set up a table for your values and use VLOOKUP, you can
easily change the values later in the table without having to update your
formula. See:
http://www.officearticles.com/excel/...soft_excel.htm
************
Anne Troy
www.OfficeArticles.com

"Fran" wrote in message
...
I need to write an if then statement that contains more than 7 nested
levels
how do I do that. So far I have:

=IF(D375,"3.350",IF(D370,"2.034",IF(D365,"1.152 ",IF(D360,".738",IF(D355,".630",IF(D350,".387", IF(D345,".252",IF(D340,".153",".063"))))))))

which works, but soon as I add another IF statement it gives me an error
message.
I need to add 2 more IF statements for this formula to work....

Thanks





Casey


Fran,
I would approach this problem differently. I would make a table on
another sheet. Something like this on say Sheet1 A1:B10:

Column A Column B
75 3.350
70 2.034
and so on....................

Then use a formula like this

IF(D3<"",VLOOKUP(D3,Sheet1!A1:B10,2,FALSE),0)

Then you can have as many choices as you need and if in the future the
values change, you just have to change the little table not all those
formulas.

HTH


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=475915



All times are GMT +1. The time now is 10:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com