Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Finding a specific cell value on different sheet

Thanks you to everyone who suggested something, I got my code to do exactly
what I want. You guys are awesome

"Gord Dibben" wrote:

"For example" means maybe more than one cell to be clicked on?

Can there be more than instance of the value on Sheet1?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Cell As Range
Const WS_RANGE As String = "C1:C100" 'adjust to suit
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Me.Range(WS_RANGE).Interior.ColorIndex = xlNone 'clear previous format
With Sheets("Sheet1").Range("C2:C100")
.Font.Bold = False 'clear previous bolded cells
Set c = .Find(Target.Value, LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
c.Font.Bold = True
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < FirstAddress
End If
End With
Target.Interior.ColorIndex = 3
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 8 Dec 2008 11:09:01 -0800, Looping through
wrote:

Can that be done?

If the user selects and activates a cell in sheet 2 (C50 as an example), I
want to have a macro that will goto sheet 1, find the matching data within
cell C2-C1000 activate that cell and make it bold, then I want the macro to
come back to sheet 2 and change the original cell to Red.

Thanks



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
Finding specific text in one cell and returning data from another Klee Excel Worksheet Functions 8 April 2nd 09 08:49 PM
Send data from userform to specific cell on specific sheet? JennLee Excel Programming 10 March 10th 07 02:55 AM
Finding Number of cells in a column of other sheet having a specific word in them [email protected] New Users to Excel 5 February 21st 07 01:51 PM
finding the address of a specific cell? botha822[_5_] Excel Programming 4 August 9th 06 11:26 PM
Finding specific data and moving it to a new sheet LauraD Excel Programming 0 July 10th 06 11:07 AM


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