+ Reply to Thread
Results 1 to 3 of 3

Macro to generate list of numbers to link only one series to a key

  1. #1
    Forum Contributor
    Join Date
    06-07-2011
    Location
    Hnd
    MS-Off Ver
    Excel 2010
    Posts
    161

    Macro to generate list of numbers to link only one series to a key

    Hello verybody,

    Please help over here.

    I have all numbers that begin with 7 linked with the Key "WRF" like this:

    A B
    7 WRF

    But if I want to link another key (QQP) with another number that begins with 7 (e.g. 7837) I need
    to expand all the 7 series in order to cover all numbers that begin with 7. leaving all linked with WRF and
    only 7837 linked with QQP like in table below.

    A B C D E
    7 0 WRF
    7 1 WRF
    7 2 WRF
    7 3 WRF
    7 4 WRF
    7 5 WRF
    7 6 WRF
    7 7 WRF
    7 8 0 WRF
    7 8 1 WRF
    7 8 2 WRF
    7 8 3 0 WRF
    7 8 3 1 WRF
    7 8 3 2 WRF
    7 8 3 3 WRF
    7 8 3 4 WRF
    7 8 3 5 WRF
    7 8 3 6 WRF
    7 8 3 7 QQP
    7 8 3 8 WRF
    7 8 3 9 WRF
    7 8 4 WRF
    7 8 5 WRF
    7 8 6 WRF
    7 8 7 WRF
    7 8 8 WRF
    7 8 9 WRF
    7 9 WRF


    I hope some excel expert could help me with this.

    Any help would be appreciated.

    Regards

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro to generate list of numbers to link only one series to a key

    What is the rule? What will determine if you assign the letters "QQP"?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Forum Contributor
    Join Date
    06-07-2011
    Location
    Hnd
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Macro to generate list of numbers to link only one series to a key

    Quote Originally Posted by JapanDave View Post
    What is the rule? What will determine if you assign the letters "QQP"?
    Hello JapanDave,

    Only there are two inputs, so the rule is simply the 2 inputs you assign.

    Input 1 = The parent series (7 in this example)
    Input 2 = The child series (7837 in this example).

    So, other example would be.

    I have the series 45 as parent series and linked to WRF and I have to link some
    series within 45, let say 4568 and link it with QQP.

    I mean, the input values would be:

    Parent Series = 45 --> link all 45 with WRF, except 4568
    Child Series = 4568 -> link with QQP

    Then I need to expand the number 45 to get the output below:

    45 0 WRF
    45 1 WRF
    45 2 WRF
    45 3 WRF
    45 4 WRF
    45 5 WRF
    45 6 0 WRF
    45 6 1 WRF
    45 6 2 WRF
    45 6 3 WRF
    45 6 4 WRF
    45 6 5 WRF
    45 6 6 WRF
    45 6 7 WRF
    45 6 8 QQP
    45 6 9 WRF
    45 7 WRF
    45 8 WRF
    45 9 WRF

    The output could be a smaller or larger table depending the inputs.

    I hope make sense.

    Thanks in advance for any help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1