The If function

M

Matt

I'm trying to write a simple formula for a columnar Ledger account that has
a Dr Entry and a Credit entry. I want to show in the balance column the
amount in $'s and the fact if it is a Dr Balance or a Credit Balance.
Cell A2 and B2 would have the heading Debit and Credit, C2 would have the
balance heading.
Cel A3 has a value of $3000 and cell B3 a Value of $4000 Cell C3 would then
have a balance of $1000Cr. This formula would then need to be copied down the
column and self adjust for each entry.
 
P

Pete_UK

In C3 you can use the formula:

=A3-B3

In C4 you can use the formula:

=C3+A4-B4

Highlight both these cells and click on Format | Cells | Number tab,
then select Custom, and in the panel type in this format:

$0"Cr";$0"Dr"

Then you can copy the formula in C4 down as far as you need to.

Hope this helps.

Pete
 
P

Pete_UK

Actually, if you want the cells in column C to show only if there is
an entry in either A or B for each row, then change the formula in C4
to this:

=IF(OR(A4<>"",B4<>""),C3+A4-B4,"")

then copy this down.

Hope this helps.

Pete
 
M

Matt

Pete Thank you the first solution seemed to work the best. I will look at the
second option tomorrow.

Thanks heaps
 
P

Pete_UK

Okay, Matt - thanks for feeding back.

Pete

Pete Thank you the first solution seemed to work the best. I will look atthe
second option tomorrow.

Thanks heaps






- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top