Goto location of another cell value
Sub FindStuff()
dim rngToFind as range
dim rngToSearch as range
dim rngFound as Range
set rngToFind = Sheets("Sheet1").Range("B4")
set rngToSeach = Sheets("Sheet2").Columns("B")
set rngFound = rngToSeach.Find(What:=rngTofind.Value, _
LookAt:=xlWhole, _
Lookin:=xlFormulas, _
MatchCase:=False)
if rngFound is nothing then
msgbox "Sorry... Not Found"
else
rngFound.Inerior.ColorIndex = 3
end if
end sub
--
HTH...
Jim Thomlinson
"CLR" wrote:
Hi All.....
If someone please, I am in need of code to select the cell in column B of
Sheet2, that contains a value matching that of cell B4 in Sheet1......and
then color the background of that cell RED. There will only be one cell in
Sheet2!B:B that will contain a matching value.
TIA
Vaya con Dios,
Chuck, CABGx3
|