View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Allllen Allllen is offline
external usenet poster
 
Posts: 341
Default tricky search and replace

Hi John,

replace XXXX with this

=OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),-2,3)
--
Allllen


"john" wrote:

hmmm... nearly got it - this *should* work in theory, but it keeps giving an
error...

=CELL("contents",ADDRESS(ROW()-2,5,4))

if I just put =ADDRESS(ROW()-2,5,4) then it returns a valid cell reference
as text.
if I put =CELL("contents",[validcellreference]) then that also works as
expected. But when I put the 2 together it gives a formula error...

and that's assuming it let's me replace the text with a formula like this...