Find Value of cell in another sheet

D

DaveM

Hi

How can I copy the value (Which is a number formatted in "Special Codigo
Postal") from sheet1 cell F9.

Goto sheet2 and Find that value in Column A then Highlight that Row

Thanks in advance

Dave
 
M

Mike H

Hi,

Right click Sheet 2 sheet tab, view code and paste this in and run it

Sub stance()
Dim myrange As Range
lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set myrange = Range("A1:A" & lastrow)
For Each c In myrange
If c.Text = Sheets("Sheet1").Range("F9").Text Then
c.EntireRow.Interior.ColorIndex = 4
End If
Next
End Sub

Mike
 
D

DaveM

Hi Mike

Thanks for your reply

My apologizes I should of said "Select the row" when it finds the cell value

Dave
 
D

DaveM

Got it

c.EntireRow.Select

Thanks Mike


DaveM said:
Hi Mike

Thanks for your reply

My apologizes I should of said "Select the row" when it finds the cell
value

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top