Help with nested if function

MannyLNJ

New Member
Joined
Oct 2, 2011
Messages
11
I need to write an if function that will do the following

IFC1 is greater than G1* . 90 set H1 to G1 * .90
IFC1 is greater than G1* . 84 set H1 to G1 * .84
IFC1 is greater than G1* .49 set H1 to G1 * .49
IFC1 is greater than G1* . 25 set H1 to G1 * .25
otherwise set G1 to ""

How to do I turn this into an IF statement
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
i need to write an if function that will do the following

ifc1 is greater than g1* . 90 set h1 to g1 * .90
ifc1 is greater than g1* . 84 set h1 to g1 * .84
ifc1 is greater than g1* .49 set h1 to g1 * .49
ifc1 is greater than g1* . 25 set h1 to g1 * .25
otherwise set g1 to ""

how to do i turn this into an if statement

Like this...

Code:
=IF(C1>G1*0.9,H1*0.84,IF(C1>G1*0.84,H1*0.84,IF(C1>G1*0.49,H1*0.49,IF(C1>G1*0.25,H1*0.25,""))))
 
Upvote 0
Like this...

Code:
=IF(C1>G1*0.9,H1*0.84,IF(C1>G1*0.84,H1*0.84,IF(C1>G1*0.49,H1*0.49,IF(C1>G1*0.25,H1*0.25,""))))

Thanks. I made a slight changed because it's really row 8 where the first set of data is so it now looks like

Code:
=IF(C8>G8*0.9,H8*0.9,IF(C8>G8*0.84,H8*0.84,IF(C8>G8*0.49,H8*0.49,IF(C8>G8*0.25,H8*0.25,""))))

I know I can't put the code in H8 because that's where it's going to put the value so where can I put it?
 
Upvote 0
Put the formula in H8...and change to

Code:
=IF(C8>G8*0.9,G8*0.90,IF(C8>G8*0.84,G8*0.84,IF(C8>G8*0.49,G8*0.49,IF(C8>G8*0.25,G8*0.25,""))))
 
Upvote 0
Thank you cstimart that works perfectly. p45cal thanks for pointing out the error in the original formula.
 
Upvote 0
A followup question I now want to add two items with fixed payments to my spreadsheet. As there is no advantage to paying them off early I want my spreadsheet to set the pay down to column to be the amount owed - the amount of my payment.

So that would be c22-e22 when I try to edit the formula that cstimart gave me Excel is saying I have too many functions. I'm not sure hat I'm missing but the code I think I need to use is below

Code:
=IF(C22>G22*0.9,G22*0.9,IF(C22>G22*0.84,G22*0.84,IF(C22>G22*0.49,G22*0.49,IF(C22>G22*0.25,G22*0.25,"",if(G22=-999,C22-E22,"")))))
 
Upvote 0
when I try to edit the formula that cstimart gave me Excel is saying I have too many functions.
Too many arguments rather than too many functions:
I've not looked at the logic, merely the syntax and taken out one
," " from:
=IF(C22>G22*0.9,G22*0.9,IF(C22>G22*0.84,G22*0.84,IF(C22>G22*0.49,G22*0.49,IF(C22>G22*0.25,G22*0.25,"",if(G22=-999,C22-E22,"")))))
leaving:
=IF(C22>G22*0.9,G22*0.9,IF(C22>G22*0.84,G22*0.84,IF(C22>G22*0.49,G22*0.49,IF(C22>G22*0.25,G22*0.25,if(G22=-999,C22-E22,"")))))

It may be easier to visualise the new formula by adding carriage returns:
=IF(C22>G22*0.9,G22*0.9,
IF(C22>G22*0.84,G22*0.84,
IF(C22>G22*0.49,G22*0.49,
IF(C22>G22*0.25,G22*0.25,
if(G22=-999,C22-E22,""
)))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top