Reputation: 105
I am trying to get cell A24
to conduct two separate SUM
functions depending on the data within other cells.
If cell F6
on sheet DEPOSIT LOG
AND cell J3
on sheet WITHDRAWAL LOG
both have data within them then I would like the following SUM
complete : =SUM('DEPOSIT LOG'!F6)-('WITHDRAWAL LOG'!J3)
However, if there is only data in F6
then I want cell A24
to =
F6
If F6
and J3
are both blanks I would like A24
to also be blank
This is the current formula in cell A24
:
=IF(COUNT('DEPOSIT LOG'!F6)=1,SUM('DEPOSIT LOG'!F6)-('WITHDRAWAL LOG'!J3),"")
If someone could tweak this or suggest an edit I that would be great.
Upvotes: 1
Views: 54
Reputation: 42256
Try this formula, please:
=IF(AND('DEPOSIT LOG'!F6<>"",'WITHDRAWAL LOG'!J3<>""),'DEPOSIT LOG'!F6-'WITHDRAWAL LOG'!J3,IF('DEPOSIT LOG'!F6<>"",'DEPOSIT LOG'!F6,""))
Upvotes: 2