View Full Version : Date Formula with IF and ISBLANK
jnix612
11-06-2023, 02:26 PM
I can't get the below formula to calculate Q6 even if it is blank.
=IF(K6="","",IF(ISBLANK(O6),TODAY()-K6,O6-K6-Q6))
K6 - Date Opened
O6 - Date Completed
Q6 - Number of days the request was on hold.
Thank you in advance. :friends:
June7
11-06-2023, 03:19 PM
Why do you want something different for ""?
Review https://support.microsoft.com/en-us/office/using-if-to-check-if-a-cell-is-blank-dff4eda1-6187-4b83-b7f6-4c3c0a1e2188
Do this test. Open a new workbook. Put these expressions in A1 and B1:
=ISBLANK(C1)
=C1=""
Both should return True.
Aussiebear
11-07-2023, 04:09 AM
jnix612, why not write the formula this was
=IF(K6="","",IF(ISBLANK(O6),Today()-K6,O6-K6-Q6))
georgiboy
11-07-2023, 04:12 AM
Is O6 blank due to the result of a formula or is it a blank cell that contains no formula?
jnix612
11-07-2023, 06:57 AM
I'm sorry I did not provide all the info. There will always be a date in K6 and O6. N6 is a project paused date.
Q6 will be blank because the project was never placed on hold so the rest of the formula should continue to calculate.
K6 - Date Opened
O6 - Date Completed
N6 - Date placed on hold
Q6 - Number of days the request was on hold.
Aflatoon
11-07-2023, 07:12 AM
As Georgiboy asked earlier, is Q6 actually empty, or does it contain a formula that returns "" if N6 is blank? If the latter, try:
=IF(K6="","",IF(ISBLANK(O6),TODAY()-K6,O6-K6-N(Q6)))
jnix612
11-07-2023, 09:42 AM
Aflatoon and Georgiboy - sorry about not paying attention to give the full details.
Yes the formula you gave me works perfect. Q6 does have a formula in it.
N6-K6 = Q6 (# days on hold)
date placed on hold - date opened = # days on hold
Using Q6 in my final formula to say how many total days was this issue open.
O6-K6-Q6 = R6 (days issue open) - my formula would not calculate if Q6 was blank
date completed - date opened - # days on hold = number of days this issue was open
Thank you all again and once again I apologize for missing details. Moving too fast. :friends:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.