Mikeal said:
I am trying to find text, but once found I need to know the cell address
so I can continue using it in a if statement?
In a formula or in VBA? If in a formula,
=CELL("Address",INDEX(SomeRange,MATCH(SomeText,SomeRange,0)))
would return the address of the first matching cell as long as SomeRange is
either single column or single row. If you have a 2D range to search, you
need a longer formula. If you were searching for 'foo' in A2:C4 containing
abd def foo
ghi jkl mno
pqr stu vwx
foo yzz zzz
and wanted C1 instead of A4, use the array formula
=CELL("Address",INDEX(A1:C4,MIN(IF(A1:C4="foo",ROW(A1:C4))),
MATCH("foo",INDEX(A1:C4,MIN(IF(A1:C4="foo",ROW(A1:C4))),0),0)))
If you wanted A4 instead of C1, use the array formula
=CELL("Address",INDEX(A1:C4,MATCH("foo",INDEX(A1:C4,0,
MIN(IF(A1:C4="foo",COLUMN(A1:C4)))),0),
MIN(IF(A1:C4="foo",COLUMN(A1:C4)))))