Sub DateCounting()
Sheets("Sheet3").Activate
Set newsht = Sheets.Add(after:=Sheets(Sheets.Count))
newsht.Name = "Data"
If the date in column J, Sheet3
-is1 day less than today’s date put a 1 in cell B2, sheet “Data”
-is 2 days less than today’s date put a 1 in cell B3, sheet “Data”
-is 3 days less than today’s date put a 1 in cell B4, sheet “Data”
-is 4 days less than today’s date put a 1 in cell B5, sheet “Data”
-is 5 days less than today’s date put a 1 in cell B6, sheet “Data”
-is 6 days less than today’s date put a 1 in cell B7, sheet “Data”
-is 7 days less than today’s date put a 1 in cell B8, sheet “Data”
-is between 8-31 days less than today’s date put a 1 in cell B9, sheet “Data”
'Loop for every row with contents so that totals appear in B2,B3,B4,etc.
Application.DisplayAlerts = False
Sheets("Sheet3").Delete
Application.DisplayAlerts = True
End Sub
If you can help, Thank you. Above is what I am trying to do. Can you help me translate what I wrote into code? Every row in column J with a date that is 1 day less than today's date I want to add in cell B2 of sheet "Data", every row that is 2 days less than today's date I want to add in cell B3 sheet "Data," and so on.
Bookmarks