Well, it works WONDERFULLY! The only thing is that I have to go back and
edit the range of the columns to find. It keeps bumping them down by one
for proceding formulas.
Thanks for your help.
I have, for example, counties in one row and under them I have cities and
towns in those counties. So, really I have columns of info. You asked
about
rows. Does it have to be in rows or can I use columns instead?
- Show quoted text -
Hello Michael,
Yes, I realised you had columns of data but what I wasn't sure of was
whether you just had a single row to search or multiple rows. It looks
like you have multiple rows so if you have counties in A1:J1 and towns/
cities below those in A2:J10 then you can use the second formula I
suggested, i.e.
=IF(COUNTIF(A2:J10,L2),INDEX(A$1:J$1,MIN(IF(A2:J10=L2,COLUMN(A2:J10)-
COLUMN(A2)+1))),"")
which needs to be confirmed with CTRL+SHIFT+ENTER.
Ultimately it would probably be easier for you if you could change
your layout so that you had a single column of all towns/cities and
the adjacent column contained the relevant County, then you can jsut
do a simple VLOOKUP.