Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default click on one cell to find and highlight a related cell?

is there a way to have i.e. a list of people's names in one column, and a
list of company regions in another column, so that whenever you click on a
person's name in the first column, Excel highlights that person's region in
the second column?

(so the user can find out any person's Region, by clicking on their name.)

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default click on one cell to find and highlight a related cell?

Place the following macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("B:B").ClearFormats
Target.Offset(0, 1).Interior.ColorIndex = 6
Application.EnableEvents = True
End Sub

If you select a cell in column B, then the equivalent cell in column B will
be hi-lighted.
--
Gary''s Student - gsnu200742


"JustSomeGuy" wrote:

is there a way to have i.e. a list of people's names in one column, and a
list of company regions in another column, so that whenever you click on a
person's name in the first column, Excel highlights that person's region in
the second column?

(so the user can find out any person's Region, by clicking on their name.)

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
How to click on a cell and have the content of the cell display in a different cell [email protected] Excel Worksheet Functions 0 June 6th 06 03:05 PM
How do I double click a cell and jump to cell's referenced cell JerryJuice Excel Discussion (Misc queries) 2 September 10th 05 10:24 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
Highlight cells with ctrl-click but only un-highlight one cell hagan Excel Discussion (Misc queries) 5 May 27th 05 06:45 PM
Click on cell-calendar drops down-click on date-date fills cell. . George Setting up and Configuration of Excel 1 April 15th 05 08:22 AM


All times are GMT +1. The time now is 02:18 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"