VBA to work out if a date is overdue

ryandonovan22

New Member
Joined
Sep 17, 2015
Messages
36
Hello,

I need a Macro to work out if a range of dates are overdue based on comparing expected delivery date against todays date

There could be any number of rows each week so it will have to perform the calculation over an undetermined range.

If I was to produce an if statement within the cell this is what I would use =if(G2<TODAY(),"Overdue",OK") and drag the formula down
<today(),"overdue","ok") range.

for the purpose of the VBA formula, this data will need to be placed into column N

Thanks,
Ryan.</today(),"overdue","ok")>
 
Last edited:
Are your dates in column G formatted as dates or are they text that look like dates. My code ran fine in my test worksheet, so I know the logic is correct if the dates in column G are in fact dates which they were in my test sheet. Without actually seeing your workbook, this will be difficult to analyze.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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