LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Highlighting cells when errors occur

Column M is mandatory is Column L = "Yes"

How do I build this in? I also need the error message that was in my
original code to be kept to, so can I do both of these in the same code?


I don't imagine you mean entire columns, so I will assume only one
row. Add the following.

If Range("L1") = "Yes" And IsEmpty(Range("M1")) Then
c.Interior.ColorIndex = 3
Else
c.Interior.ColorIndex = 0
End If

If Range("L1") = "Yes" And IsEmpty(Range("M1")) _
Then Cancel = True

Simply substitute your MsgBox text for mine.

Merjet

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlighting cells Rich Blanchard New Users to Excel 0 December 8th 10 03:50 PM
Count cells with numbers and ignore cells with errors WonderingaboutMicrosoft Excel Discussion (Misc queries) 6 December 10th 06 08:03 PM
Why errors occur in wrkbook w/ vba when saved on Shared folder? Shawna Hartman Excel Programming 1 April 10th 06 04:37 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM
Highlighting 'corresponding' cells R. Todd Miller Excel Programming 2 July 18th 03 07:46 PM


All times are GMT +1. The time now is 09:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"