Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Highlight a cell after update in a specific range

Hallo to everybody,

I am tryng to write few Vba lines to highlight a cell after update.
I am using this code, but it doesn't work, either no error message.

Can you please help me? Thanks

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng1 As Range
Dim Rng2 As Range

Set Rng1 = Range("K7:K1500") ' Column("K:K")
Set Rng2 = Intersect(Rng1, Target)

If Target.Count 1 Then Exit Sub
If Target.Column < Rng2 Then Exit Sub
Columns(Rng2).Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 6
End Sub

Regards
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Highlight a cell after update in a specific range

Hi Mark,

Am Thu, 25 Apr 2013 10:11:21 +0200 schrieb Mark:

I am tryng to write few Vba lines to highlight a cell after update.
I am using this code, but it doesn't work, either no error message.


try:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K7:K1500")) Is Nothing _
Or Target.Count 1 Then Exit Sub

Range("K7:K1500").Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 6
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Highlight a cell after update in a specific range


Hi Claus,
this is perfect!

Thanks
Regards
Mark
Reply
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
Using Excel VB, Update a specific cell, on any change of anotherspecific cell Paul Excel Discussion (Misc queries) 2 March 28th 13 12:49 PM
Highlight a cell with a specific word in it Soulscream Excel Worksheet Functions 5 January 10th 08 09:20 PM
Highlight automatically a specific cell Frances Holden[_2_] Excel Worksheet Functions 1 January 7th 08 03:05 PM
Help - Update a SQL table from a specific range in Excel NormaD Excel Programming 2 June 26th 07 10:37 PM
Highlight a row if a specific cell is specific numbers/words sea0221 Excel Worksheet Functions 2 March 9th 05 12:06 AM


All times are GMT +1. The time now is 09:58 PM.

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

About Us

"It's about Microsoft Excel"