问题
How do I stop a formula from running if there is no data in the cell to the left?
I'm trying to work out how to display elapsed time using a fixed time and a dynamic clock.
My fixed time is in Cell D5 and my dynamic clock in Cell J4
(picture attached). To work out 'elapsed time' my forumla is as follows; =J4-D5
, which works fine. However, when I copy the forumla down if there is no data in cells D6,D8,D9
etc, then it will just display the current time.
Is there some error checking that I can do that will only run the forumla if there is data present in Column D?
I am very new to excel, so apologies for the noob question.
Many thanks
回答1:
If(D5 = "","",J4-D5)
Explanation: IF D5 = "empty String" THEN "empty string". Else J4-D5.
来源:https://stackoverflow.com/questions/37143261/how-do-i-stop-a-formula-if-the-cell-is-blank