Time is up

Ralph M

Active Member
Joined
Apr 16, 2002
Messages
496
I have a spread sheet with a date for each day of the year in Col "A"
IE: Row 1 01/01/02, Row 2 01/02/02, ETC.
I have in Column Q "Occurences" which are entered as 1, in Column R, I have an If Function that says "If Q10 is > 0 Then A10 + 60, (This counts out 60 days from the date it was entered) at which time I want to remove the occurence with a -1 to take it away. I have entered a "0" in the "Occurence" Column as a reminder on the date (60 days) it is to be removed. What I want to do is have the program when it opens look at column Q and if there is a "0" and the date is => the date in Col "A",(on the 60th day), Display a MsgBox as a reminder to remove the Occurence. All I need help with is how to write the code for "If Col Q = 0 Then.... look at column "A" and see if it's => the today's date.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
Ralph, would this work for you?

<PRE>
Dim ZeroOccurrences As Long

ZeroOccurrences = Application.WorksheetFunction.CountIf(Range("Q:Q"), "=0")
If ZeroOccurrences <> 0 Then
MsgBox ("Remember to remove occurences with value of zero")
End If

</PRE>

Regards,
 

Ralph M

Active Member
Joined
Apr 16, 2002
Messages
496
Barrie,
I need it to check Column Q for the "0", but I also need it to check for the date in Column A to see if it's >= Today.
 

Ralph M

Active Member
Joined
Apr 16, 2002
Messages
496
Barrie,
In my posting I explained that I am using R for the date in column A + 60 days.
 

Forum statistics

Threads
1,144,050
Messages
5,722,229
Members
422,417
Latest member
Johhny

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
Top