ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA Show in red if Date another date (https://www.excelbanter.com/excel-discussion-misc-queries/254678-vba-show-red-if-date-another-date.html)

Mouimet

VBA Show in red if Date another date
 
Hi,
Small Problem I think
Because the user can delete Rows in the worksheet I can not use the normal
Conditional formating.
I think the VBA is the solution

Col "A" have a date, example: 2009-01-25
The user will add a date in Col "P" to close the lead. Example: 2009-03-02
I need to highlight the date in Column "P" if it is 45 days over the date in
Col "A".

The only way I can see is using the VBA.
Like I said, I need to select the col ("A:A") and ("P:P") because the user
can sometimes delete some rows.
Can someone help me on this?
THanks


Daryl S

VBA Show in red if Date another date
 
Mouimet -

I would record a macro while adding the conditional formatting to the
columns. Then you can add code to run that macro after the user updates any
of the date fields in column P (or column A if they are allowed to change
that one).

--
Daryl S


"Mouimet" wrote:

Hi,
Small Problem I think
Because the user can delete Rows in the worksheet I can not use the normal
Conditional formating.
I think the VBA is the solution

Col "A" have a date, example: 2009-01-25
The user will add a date in Col "P" to close the lead. Example: 2009-03-02
I need to highlight the date in Column "P" if it is 45 days over the date in
Col "A".

The only way I can see is using the VBA.
Like I said, I need to select the col ("A:A") and ("P:P") because the user
can sometimes delete some rows.
Can someone help me on this?
THanks


Gord Dibben

VBA Show in red if Date another date
 
Are the start and close dates in the same row in A and P?

If so, what's the problem?

If the row is deleted, the formatted date in P is gone along with the start
date in A

Please use some cell references for your dates locations.


Gord Dibben MS Excel MVP

On Thu, 28 Jan 2010 07:13:01 -0800, Mouimet
wrote:

Hi,
Small Problem I think
Because the user can delete Rows in the worksheet I can not use the normal
Conditional formating.
I think the VBA is the solution

Col "A" have a date, example: 2009-01-25
The user will add a date in Col "P" to close the lead. Example: 2009-03-02
I need to highlight the date in Column "P" if it is 45 days over the date in
Col "A".

The only way I can see is using the VBA.
Like I said, I need to select the col ("A:A") and ("P:P") because the user
can sometimes delete some rows.
Can someone help me on this?
THanks




All times are GMT +1. The time now is 11:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com