A simple "if" function

gthorley

New Member
Joined
May 7, 2003
Messages
20
I used to be able to set these up in 123 but I guess I am getting old.

Can someone give me the correct if function to get the following result

If the balance cell is greater than 0 then the amount under monthly is (1000*.03)/12 and if negative then -(1000*.06)/12

-------------------monthly-------balance
Cash(Margin)--------- 0--------- 1000

This is what I entered in the monthly cell with the balance being cell H3 and it doesn't work

=IF(H3<0,(0.0675*H3)/12),(0.0312*H3)/12
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
You just had a paren in the wrong place:

=IF(H3<0,(0.0675*H3)/12,(0.0312*H3)/12)

HTH,
 
Upvote 0

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi gthorley:

Please note that in your formula ...

=IF(H3<0,(0.0675*H3)/12,(0.0312*H3)/12) (as re-presented by smitty)

the second argument will apply if Cell H3 is not less than 0 ... that means it will apply when H3 is =0 as well as when H3 is >0.
 
Upvote 0

gthorley

New Member
Joined
May 7, 2003
Messages
20
Thanks for the correction. Yogi I did realize that and it will not effect the use I need.

I found that the following formula worked as well

=IF(H23<0,((0.0675*H23)/12),((0.0312*H23)/12))

and it has what seems to be uneeded parenthesis

=IF(H3<0,(0.0675*H3)/12,(0.0312*H3)/12)
 
Upvote 0

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
I used to be able to set these up in 123...
From what I recall it's really very similar, but I haven't used 123 since '94 or so...

I found that the following formula worked as well

=IF(H23<0,((0.0675*H23)/12),((0.0312*H23)/12))

and it has what seems to be uneeded parenthesis
Yup, but if you look in edit mode, Excel will actually color each successive open paren with its mate on the other end. I've found that really handy on some of my monstrous formulas (I don't remember if 123 did/does that or not).

it will apply when H3 is =0 as well as when H3 is >0.
Thanks for pointing that out Yogi, as I didn't. (And good to see you around! :LOL:)
 
Upvote 0

Forum statistics

Threads
1,190,647
Messages
5,982,116
Members
439,756
Latest member
alice128

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
Top