how can I combine these two formulas

rincewind2019

New Member
Joined
Jan 29, 2019
Messages
23
Hi, Anyone know how I can combine these formulas?

=IF(OR(ISBLANK(A5),ISBLANK(B5)), ""

=SUM($H$5:H5)-SUM($I$5:I5)

Thanks
 
[TABLE="width: 907"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]Description[/TD]
[TD]Rec No[/TD]
[TD]Income[/TD]
[TD]F1[/TD]
[TD]Expenditure[/TD]
[TD]CHQ No[/TD]
[TD]Deposits[/TD]
[TD]Withdrawals[/TD]
[TD]Balance[/TD]
[TD]Cash[/TD]
[/TR]
[TR]
[TD]01/01/2019[/TD]
[TD]B/F[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]£100.00[/TD]
[TD]£50.00[/TD]
[/TR]
[TR]
[TD]02/01/2019[/TD]
[TD]Cash to bank[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] £25.00[/TD]
[TD] [/TD]
[TD]£125.00[/TD]
[TD]£25.00[/TD]
[/TR]
[TR]
[TD]03/01/2019[/TD]
[TD]Bank to cash[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] £10.00[/TD]
[TD]£115.00[/TD]
[TD]£20.00[/TD]
[/TR]
</tbody>[/TABLE]

Think I'm getting a little bogged down by asking too much.
Does anyone know of a formula that will transfer amount from cash to bank account and visa versa where the only amounts entered are in the deposits and withdrawals columns the rest of the formulas I have work perfectly its just this one that is driving me nuts.

Thank you.
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
then you can ADD an IF() to the normal formulas you are using and say

In cash balance column
=IF ( B3 = "cash to bank", formula to decrease cash balance, if(B3 = "bank to cash", formula to increase cash , normal cash formula )

in balance column
=IF ( B3 = "cash to bank", formula to increase balance, if(B3 = "bank to cash", formula to decrease balance , normal balance formula )
 
Upvote 0
in the balance column I put =IF(B3=”cash to bank”,J2+H3,IF(B3=”bank to cash”,J2-I3,J2))

In the cash column I put =IF(B3=”cash to bank”,K2+I3,IF(B3=”bank to cash”,J2-H3,J2))

The only response I get is #NAME ?
 
Upvote 0
should be oK
=IF(B3=”cash to bank”,J2+H3,IF(B3=”bank to cash”,J2-I3,J2))

in a different cells try out those formulas - see if you get #name

=J2+H3
=J2-I3
=J2
see if you still get #name

are you copying - sometimes the " need to be entered and not copied

 
Last edited:
Upvote 0
Almost there the balance column works fine with =IF(B3="cash to bank",J2+H3,IF(B3="bank to cash",J2-I3,J2)) entered
But the cash column with =IF(B3="cash to bank",K2+H3,IF(B3="bank to cash",K2-I3,K2)) doesn't it goes up the same amount as the balance.

I also need to nest it with =IF(OR(ISBLANK(A5),ISBLANK(B5)), "",H5+J4-I5) in the balance column
and =IF(OR(ISBLANK(A5),ISBLANK(B5)),"",IF((H5+I5)=0,D5+K4-F5,K4)) in the cash column.
 
Upvote 0
But the cash column with =IF(B3="cash to bank",K2+H3,IF(B3="bank to cash",K2-I3,K2)) doesn't it goes up the same amount as the balance.
why in the cash column do you use
K2+H3
isnt that K2 -H3, as the Cash goes into the BANK so it removes the CASH
same for BANk to cash - don't you have these the wrong way round

You need to look at the logic of the formula , as i may have got the wording not 100% but you should understand the principle

same with the nested if - IF its nether Cash to bank or Bank to cash then your normal forumla should apply

balance

=IF(B3="cash to bank",J2+H3,IF(B3="bank to cash",J2-I3,IF(OR(ISBLANK(A5),ISBLANK(B5)), "",H5+J4-I5))))
or we could do the A5/B5 test first - NOTE I have just copied and pasted - Make sure all the ROWS are referenced here correctly

=IF(OR(ISBLANK(A5),ISBLANK(B5)), "",IF(B3="cash to bank",J2+H3,IF(B3="bank to cash",J2-I3,H5+J4-I5))))

so Starting at B3, should that be
=IF(OR(ISBLANK(A3),ISBLANK(B3)), "",IF(B3="cash to bank",J2+H3,IF(B3="bank to cash",J2-I3,H3+J2-I3))))

and then the same logic for the cash

 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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
Back
Top