Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

# Thread: If Date Cell Less Than Todays Date Calculate Difference In Days

1. Member
Join Date
8th March 2008
Location
USA
Posts
21

## If Date Cell Less Than Todays Date Calculate Difference In Days

I have column B with a heading "Days Remaining" and column L with a heading "Deadline".

starting with row 5, I need to be able to enter a date in L5 and see the days I have left, from that day untill today, on B5.

I need to then be able to enter a date into L6 and see a result in B6 and on and on.

Then I need to be able to insert or delete a column and have the formulas still work in the columns with the heading "Days Remaining" and "Deadline"

Thanks you.

Excel Video Tutorials / Excel Dashboards Reports

2. ## Re: Calculate Difference Between Dates, Reference Absolute Columns

Format the cells in column-B as numbers (no decimals) and use this formula to calculate the days remaining to deadline: TODAY()-L5.
Drag the formula down column-B to fill the other cells as needed.

Then I need to be able to insert or delete a column and have the formulas still work in the columns with the heading "Days Remaining" and "Deadline"
Note the use of relative cell references in the formula. Excel will auto-adjust the formula when you add or delelete columns.

3. ## Re: Calculate Difference Between Dates, Reference Absolute Columns

B5: =IF(L5<TODAY(),TODAY()-L5,"")

copy down

4. Member
Join Date
8th March 2008
Location
USA
Posts
21

## Re: Calculate Difference Between Dates, Reference Absolute Columns

that's funny. All this time I had been stuck on a portion of the code while doing this programmatically through VBA and I didn't even stop and consider that it could be done with a simple cell formula!!

Thanks, I got the following code to work in cell B5:

=IF(L5>TODAY(),L5-TODAY(),"")
Last edited by Dave Hawley; May 14th, 2008 at 09:12.

Excel Video Tutorials / Excel Dashboards Reports

5. ## Re: Calculate Difference Between Dates, Reference Absolute Columns

VBAHelpMe, please lower you experience leel and sto[p using code tags on formulas.

6. Member
Join Date
8th March 2008
Location
USA
Posts
21

## Re: If Date Cell Less Than Todays Date Calculate Difference In Days

what do you mean "lower your experience leel"?

Excel Video Tutorials / Excel Dashboards Reports

7. ## Re: If Date Cell Less Than Todays Date Calculate Difference In Days

"leel" should be "level"

VBAHelpme,

in your profile, you indicate "Above Average" for Experience. This is perhaps not the most accurate description of reality

It's in your own advantage to do so, since helpers generally adjust the level of details they provide, depending on the assumed experience of the topic starter.

Wigi

8. ## Re: If Date Cell Less Than Todays Date Calculate Difference In Days

Thanks, Wigi. My fat fingers

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
porno