Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9697

IF function that leaves the last number calculated if statement is true/false

$
0
0

I am trying to write a formula that updates a number in the cell if another cell is empty, and leaves the last number calculated if the other cell is not empty. I am calculating my profit, which changes until I actually collect it, because my AMOUNT SPENT is a dollar value calculated from a price and quantity of bitcoin. So far I have this:=IF(ISBLANK(K2),C2-H2,())Where C2 is AMOUNT RECEIVED and H2 is AMOUNT SPENT i.e.

AMOUNT RECEIVEDAMOUNT SPENTPROFIT
400350Amount received - amount spent

K2 is another cell somewhere that acts as a true/false mechanism. If it is not empty, that means I have collected the profit and it no longer varies (the amount spent is Bitcoin price x amount of bitcoin spent) so my profit changes until I convert between currencies.There is probably another way of going about this that I am too inexperienced to see.Sorry for any clarity issues, I am not great with this stuff.


Viewing all articles
Browse latest Browse all 9697

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>