Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default conditional formatting, when select a cell.

hi,
i want to make conditional formatting to a cell (say A2) only of i selct
B2...how to write this select command in contional formatting box?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default conditional formatting, when select a cell.

Saad,

You could use the selection change event. Copy the code below, right-click the sheet tab, select
"View Code" and paste the code in the window that appears.

The code will change the fill of cell A2 to red when B2 is selected.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$2" Then
Range("A2").Interior.ColorIndex = 3
Else
Range("A2").Interior.ColorIndex = xlNone
End If
End Sub


"Saad" wrote in message
...
hi,
i want to make conditional formatting to a cell (say A2) only of i selct
B2...how to write this select command in contional formatting box?



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
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Conditional Formatting - Can I select a select with Conditional Formatting? Greegan Excel Worksheet Functions 5 October 31st 05 02:19 PM
Can I select hiding a column as a conditional formatting? Teresa Excel Discussion (Misc queries) 3 July 28th 05 05:45 PM
can not select conditional formatting gbeard Excel Worksheet Functions 2 April 10th 05 06:15 PM
Select Case Conditional Formatting Sub? RCW Excel Discussion (Misc queries) 2 February 5th 05 10:29 PM


All times are GMT +1. The time now is 02:37 AM.

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"