ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nesting IF funtions (https://www.excelbanter.com/excel-worksheet-functions/228705-nesting-if-funtions.html)

loweightes

Nesting IF funtions
 
I am trying to automate a price list, and get the sheet to return a selling
price on the variable cost price and markup amount. I have the formula:

=IF(D920,ROUNDUP(((D9+$P$10)+((D9+$P$10)*$P$3)),1 ),IF(D9<20,ROUNDUP(((D9+$P$9)+((D9+$P$9)*$P$3)),1) ,IF(D9<15,ROUNDUP(((D9+$P$8)+((D9+$P$8)*$P$3)),1), IF(D9<10,ROUNDUP(((D9+$P$7)+((D9+$P$7)*P7)),1),IF( D9<5,ROUNDUP(((D9+$P$6)+((D9+$P$6)*$P$3)),1))))))

D9 = cost price
p10 = uplift
p3 = sales tax to be added

This seems to work perfectly for the first two options, but returns the
second option for the other three. I have tried all variations of commas and
brackets to no avail.

Help would be greatly appreciated.

Thanks

Jacob Skaria

Nesting IF funtions
 
Suppose D9 is 10. This will result in the 2nd condition (D9<20) and the 3rd
condition <15 to be true... When you use nested IF arrange the conditions in
a sequential order and then either use < or .. For example

<10,<15,<20,<25

In the above if D9 is 10.... it checks the condition in order....Please try...


If this post helps click Yes
---------------
Jacob Skaria


"loweightes" wrote:

I am trying to automate a price list, and get the sheet to return a selling
price on the variable cost price and markup amount. I have the formula:

=IF(D920,ROUNDUP(((D9+$P$10)+((D9+$P$10)*$P$3)),1 ),IF(D9<20,ROUNDUP(((D9+$P$9)+((D9+$P$9)*$P$3)),1) ,IF(D9<15,ROUNDUP(((D9+$P$8)+((D9+$P$8)*$P$3)),1), IF(D9<10,ROUNDUP(((D9+$P$7)+((D9+$P$7)*P7)),1),IF( D9<5,ROUNDUP(((D9+$P$6)+((D9+$P$6)*$P$3)),1))))))

D9 = cost price
p10 = uplift
p3 = sales tax to be added

This seems to work perfectly for the first two options, but returns the
second option for the other three. I have tried all variations of commas and
brackets to no avail.

Help would be greatly appreciated.

Thanks


loweightes

Nesting IF funtions
 
Brilliant - many thanks., I would never have worked that out.

"Jacob Skaria" wrote:

Suppose D9 is 10. This will result in the 2nd condition (D9<20) and the 3rd
condition <15 to be true... When you use nested IF arrange the conditions in
a sequential order and then either use < or .. For example

<10,<15,<20,<25

In the above if D9 is 10.... it checks the condition in order....Please try...


If this post helps click Yes
---------------
Jacob Skaria


"loweightes" wrote:

I am trying to automate a price list, and get the sheet to return a selling
price on the variable cost price and markup amount. I have the formula:

=IF(D920,ROUNDUP(((D9+$P$10)+((D9+$P$10)*$P$3)),1 ),IF(D9<20,ROUNDUP(((D9+$P$9)+((D9+$P$9)*$P$3)),1) ,IF(D9<15,ROUNDUP(((D9+$P$8)+((D9+$P$8)*$P$3)),1), IF(D9<10,ROUNDUP(((D9+$P$7)+((D9+$P$7)*P7)),1),IF( D9<5,ROUNDUP(((D9+$P$6)+((D9+$P$6)*$P$3)),1))))))

D9 = cost price
p10 = uplift
p3 = sales tax to be added

This seems to work perfectly for the first two options, but returns the
second option for the other three. I have tried all variations of commas and
brackets to no avail.

Help would be greatly appreciated.

Thanks



All times are GMT +1. The time now is 06:41 AM.

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