Okay, assume your data now starts in A10 and goes down to B19 - the
first formula I gave you should be this in C10:
=A10&"_"&COUNTIF(A$10:A10,A10)
and copy this down to C19. Notice that all the row references are the
same as the starting row.
Suppose now that the number you input is in E5, then the formula in F5
would become:
=IF(ISNA(MATCH(E$5&"_"&ROW(A1),C$10:C$19,0)),"",INDEX(B$10:B$19,MATCH(E
$5&"_"&ROW(A1),C$10:C$19,0)))
and again this is copied down as many rows as you think you might
need.
In a real case your range is likely to be much larger, so assuming you
still have the same columns as I've assumed, then any reference to C
$10:C$19 or B$10:B$19 should be changed to suit your data. If you have
2000 rows, for example, this would become C$10:C$2009. Note that the E
$5 relates to the cell where you want to enter your search number, and
A1 is used for the first row the formula is put in - it will change as
you copy the formula down.
Hope this helps.
Pete
> > Suppose you have something like this in A1:B10:
>
[quoted text clipped - 81 lines]
>
> - Show quoted text -
Jagaude - 28 Feb 2008 20:48 GMT
> Okay, assume your data now starts in A10 and goes down to B19 - the
> first formula I gave you should be this in C10:
[quoted text clipped - 112 lines]
>
> - Show quoted text -
Hi Pete,
Thank you, I'll play with it. Now here's another good challenge for
you. If I would like the formula to return the names associated with a
value greater than 3. So basically, return the names that have the
value 3, 5 and 7 from the example.
Thanks,
Jagaude.
Pete_UK - 29 Feb 2008 01:32 GMT
You just need to make a change to the first formula I gave you.
Assuming the set up as in the latest scenario, i.e. with the data
starting in A10 and the number of interest in E5, then put this
amended formula in C10:
=IF(A10>=E$5,E$5&"_"&COUNTIF(A$10:A10,">="&E$5),A10&"_"&COUNTIF(A
$10:A10,A10))
and copy down. The sequence in column C will change, depending on the
value in E5, but the names appearing in column F will reflect your
latest requirements, i.e. all those with numbers in column A which are
greater than or equal to the number in E5. You may need to copy the
formula in column F down more rows to accomodate the increased number
of names.
Hope this helps.
Pete
> > Okay, assume your data now starts in A10 and goes down to B19 - the
> > first formula I gave you should be this in C10:
[quoted text clipped - 125 lines]
>
> - Show quoted text -