how could i find the nearest precedent cell with given formating

I

iangel79

hi, All,

how can i find the nearest cell that corresponds to a given formatin
(for ex: the nearest precedent cell in which there is one space befor
the text content)

thank you in advance!
I
 
P

Peo Sjoblom

This will return what's in the first cell with a leading space counted from
A1:A20


=INDEX(A1:A20,MATCH(TRUE,LEFT(A1:A20)=" ",0))

entered with ctrl + shift & enter, if you only want the row number

=MATCH(TRUE,LEFT(A1:A20)=" ",0)

entered the same way



--

Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 

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