Conditional Formatting with alert message

Pat801

New Member
Joined
Mar 18, 2008
Messages
34
I have a spread sheet where column G contains dates projects were completed. If the project hasn't been completed the cell should be blank.

What I would like to do is turn the entire row gray (15% gray) when a date is entered into the cell in column G. I would also like an alert message to appear reminding them to submit their satisfaction statement.

I have tried using conditional formatting setting the cell condition to not equal to blank, but that seems to turn the cell gray even if I haven't entered a date, and it leaves it gray if I delete the date.

I have no idea on the alert message, so any help is most appreciated.

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about something like this...

Place this code in the worksheet module
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 7 Then Exit Sub
If IsNumeric(Target) Then MsgBox "Don't forget to submit your satisfaction statement."
End Sub

Highlight however many cells this formatting will effect and enter in conditional formatting =ISNUMBER($G2)
 
Upvote 0
Thank you for the quick response.

I pasted the code in what I think is the right place, and I put conditional formatting in the Formula is area of the Conditional Formatting window. I had to change the row identifier to G3 because I have two header rows.

I can get the row to change color, but I don't get a message box. Also, is there a way to apply the conditional formatting to all rows without having to update the condition statement for each row? Maybe a wildcard or something like that.

Thanks
 
Upvote 0
For the code, right click on the affected sheet and paste the code.

For the conditional formatting, enter the format and then apply it to all the cells in question.
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,960
Members
449,057
Latest member
FreeCricketId

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