Returning Values for Date Intervals

lager1001

Board Regular
Joined
May 17, 2019
Messages
88
I need some help with a formula and I've tried searching but not finding an exact match to what I'm looking for.

Column A has hundreds of dates, past, present(today), and future.

I need a formula that will tell me how many days old (by interval) any past dates are. The intervals would be 0-5 Days, 6-10 Days, 11-15 Days, 16-20 Days, 21-25 Days, 26-30 Days, 31-35 Days, 36-40 Days, 41-45 Days, etc. Anything AFTER today would just return the value of "Future Order").

Thank you for any help!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
How about:


Book1
AB
1DateInterval
21-Jan276-280 Days
31-May156-160 Days
41-Sep31-35 Days
515-Sep16-20 Days
626-Sep6-10 Days
71-Oct1-5 Days
87-OctToday
91-DecFuture Order
Sheet1
Cell Formulas
RangeFormula
B2=IF(A2),MROUND(TODAY()-A2,5)-4&"-"&MROUND(TODAY()-A2,5)&" Days",IF(A2=TODAY(),"Today","Future Order"))
 
Upvote 0
Looks like I misunderstood how MROUND works. Try this instead:


Book1
AB
1DateInterval
21-Jan276-280 Days
31-May156-160 Days
41-Sep36-40 Days
515-Sep21-25 Days
626-Sep11-15 Days
71-Oct6-10 Days
87-OctToday
91-DecFuture Order
Sheet1
Cell Formulas
RangeFormula
B2=IF(A2),ROUNDUP((TODAY()-A2)/5,0)*5-4&"-"&ROUNDUP((TODAY()-A2)/5,0)*5&" Days",IF(A2=TODAY(),"Today","Future Order"))
 
Upvote 0
Or with Eric's original formula
=IF(A2<TODAY(),MROUND(TODAY()-A2+2,5)-4&"-"&MROUND(TODAY()-A2+2,5)&" Days",IF(A2=TODAY(),"Today","Future Order"))

which seems to work.
 
Upvote 0
Glad we could help!

Fluff, it looks like part of your formula got cut off, but it appears to be a clever fix to my original formula.
 
Upvote 0
It' the dreaded < again, it should be
=IF(A2< TODAY(),MROUND(TODAY()-A2,5)-4&"-"&MROUND(TODAY()-A2,5)&" Days",IF(A2=TODAY(),"Today","Future Order"))

Iv'e never come across the Mround function before, so thought I'd have a play with it :)
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,031
Members
448,940
Latest member
mdusw

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