Link to home
Start Free TrialLog in
Avatar of Jegajothy vythilingam
Jegajothy vythilingamFlag for United States of America

asked on

Excel 2007 - formula

My OS is win 7 prof 64 bit and I use Excel 2007.
I have not used Excel for a long time.
I am trying to write a formula.  The values will be currency format.
Say, in cols B2 is "Credit", B2 is "Debit" and C2 is the "balance."

If C3 = 100
and B4 = 90
Then the formula for C4 is required.
(Note in a row entry, there will only be a Credit or Debit entry recorded, not both, and it will never be zero or null. )
It will be like, The (balance + Credit) - Debit
I think it should be an IIF command, but I am not sure, i.e.
if the Debit is 0.0, the balance = balance + Credit
if the Debit is 5.00, and the credit is 0.00, then the balance = balance - Debit
I hope my hypothesis makes sense.  Grateful for your suggested formula for the balance please.
Thank u
ASKER CERTIFIED SOLUTION
Avatar of Harry Lee
Harry Lee
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jegajothy vythilingam

ASKER

in response to HarryHYLee, thank u for your response.  I tried duplicating your example, but looks like I may have goofed up something that I cannot spot.  
Attached is the sample file, I am sure u can spot the error in the formula.  Please let me know here or on the file where the error is.  Thank u.
formula.xlsx
SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jegajothy,

Please see the example.
Q-28264008.xlsx
Thank u everyone for your suggestions.