1

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.

Insider
  • 95
  • 12

1 Answers1

2

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,""))
FaneDuru
  • 38,298
  • 4
  • 19
  • 27
  • could you possibly take a look at my latest question? – Insider Mar 30 '21 at 12:09
  • @Excel newman: Where your question is? Did you place a link and I am missing it? – FaneDuru Mar 30 '21 at 12:16
  • If you go on my profile you should be able to see it? https://stackoverflow.com/questions/66870595/what-formula-will-allow-me-to-complete-certain-sums-depending-on-the-data-of-a-d – Insider Mar 30 '21 at 12:17
  • @Excel newman: I am not available now. Very busy at the office... If no answer to your question, I can look at it after some hours when I will be at home. – FaneDuru Mar 30 '21 at 13:23
  • thanks that would be really great if you could, no rush though! – Insider Mar 30 '21 at 14:06