• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

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
  • 2
  • 2
2 Solutions
Harry LeeCommented:

Can you upload a sample spreadsheet? Some points in your question seems to be contradicting. You were saying in Column B2 is "Credit", then you are saying B2 is Debit? How can a B2 the debit sits in the Column B which is supposed to be credit?

I assume you are saying Column A is credit, Column B is debit, and Column C is balance.

That way, you can write something like this in Column C. Let's say C3. =C2+A3-B3.

If you don't want it to show anything when there is nothing in A and C, then =If(sum(A3:B3)=0,"",C2+A3+B3)

That should get the job done.
jegajothyretiredAuthor Commented:
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.
barry houdiniCommented:
Try this formula in C3


regards, barry
Harry LeeCommented:

Please see the example.
jegajothyretiredAuthor Commented:
Thank u everyone for your suggestions.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now