# A simple "if" function

#### gthorley

##### New Member
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
You just had a paren in the wrong place:

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

HTH,

#### Yogi Anand

##### MrExcel MVP
Hi gthorley:

=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.

#### gthorley

##### New Member
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)

#### Smitty

##### Legend
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! )

Replies
0
Views
137
Replies
3
Views
524
Replies
3
Views
225
Replies
5
Views
725
Replies
4
Views
231

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.

### Which adblocker are you using?

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

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