Returning 0 an if statement of reference cell is unknown

Status
Not open for further replies.

Bexcel11

New Member
Joined
May 10, 2019
Messages
5
Hi All,
In cell T7,I am trying to calculate number of weeks between 2 date columns L7-K7 unless there is no date listed in L7, therefore it calculates from AB1 which has formula =Today() so it accumulates until a date is put in L7.
The formula I have currently in cell T7 is below:
=IF(L7=“”,$AB$1-K7,L7-K7)/7
This currently works perfectly, my problem is there will be a time when both K7 and L7 dates are unknown or “blank”, when this is the case I need T7 to return a ‘0’ and/or ignore the formula.
It currently returns 6228.
Please help.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Something like

=IF(AND(K7="",L7="","",IF(L7=“”,$AB$1-K7,L7-K7)/7

it will need a closing bracket somewhere
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top