Need help with "IF" formula for dates older than 7 days

kiwicanadian

New Member
Joined
Feb 24, 2019
Messages
1
Hi,

I am making a spreadsheet where I want to note if 2 dates are greater than 7 days. For example:

ReceivedTypecollected
2/20/19swab15/02/2019
21/02/2019swab12/02/2019

<colgroup><col><col><col></colgroup><tbody>
</tbody>

I have been using: =IF((A1-C1)>=7, "Old"), and a few other similar but it is not working and it is putting everything as Old.

Any help would be greatly appreciated. Thanks!
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,271
Office Version
  1. 2013
Platform
  1. Windows
Try

<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="color: #333333;background-color: #FAFAFA;;">Received</td><td style="color: #333333;background-color: #FAFAFA;;">Type</td><td style="color: #333333;background-color: #FAFAFA;;">collected</td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;color: #333333;background-color: #FAFAFA;;">7/02/2019</td><td style="color: #333333;background-color: #FAFAFA;;">swab</td><td style="text-align: right;color: #333333;background-color: #FAFAFA;;">15/02/2019</td><td style="text-align: center;;">old</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;color: #333333;background-color: #FAFAFA;;">6/02/2019</td><td style="color: #333333;background-color: #FAFAFA;;">swab</td><td style="text-align: right;color: #333333;background-color: #FAFAFA;;">12/02/2019</td><td style="text-align: center;;">new</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D2</th><td style="text-align:left">=IF(<font color="Blue">(<font color="Red">C2-7</font>)<A2,"new","old"</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D3</th><td style="text-align:left">=IF(<font color="Blue">(<font color="Red">C3-7</font>)<A3,"new","old"</font>)</td></tr></tbody></table></td></tr></table><br />
 
Last edited:

on3moy

New Member
Joined
Feb 24, 2019
Messages
7
Use Days() Function. It returns the date into number of days. Then Subtract them and do a logical formula like so.
=IF(DAYS(End_Date,Start_DAte)>7,"Past Seven","")
 

Watch MrExcel Video

Forum statistics

Threads
1,109,367
Messages
5,528,271
Members
409,813
Latest member
robyrux

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top