Forum Discussion
Deleted
Dec 23, 2024Disregard cells appearing as blank, but still containing formulas
Hi,
I've put together the following formula.
=IF(OR($E51="",$F51=""),"",IF(OR($I$4="4 Week",$I$4="Please Select"),$F51-$E51+1,IF(AND(OR($I$4="13 Week",$I$4="26 Week"),AND($E51>=$D$6,$F51<=$E$44)),$F51-$E51+1,IF(AND($I$4="52 Week",AND($E51>=$D$6,$F51<=$E$44)),$F51-$E51+1,""))))
F51 and E51, contain dates that I enter manually and D6 to E44 are dates calculated based on a formula in the cell.
Depending on what I4 states, D6 - E44 will populate with corresponding weeks.
What I want to happen is if the dates entered into cells E51 and F51 fall outside the dates in D6-E44 then no figure populates. The problem I'm having is if cells in D6-E44 are blank, due to my selection in I4, with a formula then a figure is still populated based on the above formula.
Is there a way I can have this section of the formula: AND($E51>=$D$6,$F51<=$E$44) disregard blank cells with formulas in them?
This is a doc I share, so trying to make it as simple as possible and I'm unable to use macros as this is locked.
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Alternatively, you can attach it to a private message to me. Thanks in advance.