View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Lookup formula required

If Child Codes follow an alphabetical pattern this would be relatively easy,
is that the case. In other words if you sort the list of child codes would
the be grouped such that parent codes would be together?

Please also show us the layout of your data -
Child Code Parent Code
....
?

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"cangiff" wrote:

Thanks for this. I can see that this will work, and I may have to go down
this route.

However, I forgot to mention that although there are only 100 parent codes,
there are in excess of 5000 child codes. Some of the parents are linked to
in excess of 400 child codes. Children codes a frequently added to and
infrequently removed. I was hoping that I could maintain a table that had
ranges of child codes instead of detailing individual codes as the resultant
table would be more difficult to maintain.
--
cangiff


"T. Valko" wrote:

Create a 2 column table with the cild codes in the left column and the
corresponding parent codes in the right column:

...........A..........B
1......100.......Y02
2......101.......Y02
3......ABB.....Y02
4......111.......Y01
5......AAA.....Y01

Fill in *all* of the codes.

Then...

D1 = input cell = 111

Formula in cell E1:

=VLOOKUP(D1,A1:B5,2,0)

--
Biff
Microsoft Excel MVP


"cangiff" wrote in message
...
I am trying to do something that I am sure is very simple to achieve, but
it
is beyond my limited knowledge i.e.

I have a list of 100 3 digit codes that can be alpha/numeric.

Each code represents the aggregate of of another series of 3 digit codes
that can also be alpha/numeric e.g.

Parent Y01 is total of children codes in ranges 111 - 120, AAA-AAE
Parent Y02 is total of children codes in ranges 100-110, 131-140, ABB-ABF
Parent Y03 is total of children codes in ranges 121-130, 141-150, AAF-ABA

I would like a formula that will return which parent code applies for any
given child code i.e.

Input: Child code = 111
Output: Parent code = Y01

Can anyone suggest a solution?

cangiff