Need Help With Formula/Function

S

scchang

Looking for a way to search a worksheet for a given value and return the
column and row header value(s) for the found cell(s). Any help
appreciated!
 
R

R..VENKATARAMAN

try something like this

Public Sub test()
Dim cfind As Range
Set cfind = Cells.Find(what:="h") 'h is the value you want to find.
change this
MsgBox "the coumn header is " & cfind.End(xlUp)
MsgBox "the row header is " & cfind.End(xlToLeft)


End Sub
 
S

scchang

That worked. Thanks.

To expand, how would I modify this to find all occurrences of "h" an
return specific row and column values for each occurence in tabl
form?

Appreciate your help
 
Top