Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    London, Gtr London
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formula for Data Selection (2003)

    Hi all

    Assuming I have some data, which I have imported into Excel using MS Query from an SQL database, which could look like this below:

    Client | Job | name | address | city | state
    36598 | 1 | tiger auto |33 woods | miami |fl123
    86598 | 2 | phil lumber |3 duck | london |fh2134
    59871 | 3 | david engin |1200 duval | charleston |hj324
    87456 | 4 | stewart inc |3 payne dr | new york | kl9090
    86598 | 5 | phil lumber | 3 duck | london | fh2134
    59871 | 6 | david engin |1200 duval | charleston | hj324

    I would like to enter a "Client" code, lets say "86598" and I would like to return the data relevant to this client only, in the adjacent cells.

    Example:
    Client Job name address city state
    86598 2 phil lumber 3 duck london fh 2134
    86598 5 phil lumber 3 duck london fh 2134

    Its been a while since I used excel so I don't even know which fomula to use otherwise I would have done a search for it and carried on, so any help would be most welcome.

    Further explanation:
    The data I'm bringing back is automatically updating columns A to E with data.

    The user selection/parameter (from another program) will be in cell F1.

    I need the relevant rows extracted from the original data and populated in columns G to K along side, because I need to generate graphs and pivot tables from this extract.

    I hope this makes sense, thanks in advance
    Hayden

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formula for Data Selection (2003)

    Does the attached workbook do what you want?

    BTW, you usually get your answer quicker if you attache a workbook with your data rather than pasting it in the message because the person answering does not have to waste time recreating the workbook to test the solution.
    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    London, Gtr London
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formula for Data Selection (2003)

    Hi Legare Coleman

    Thanks for your reply, my appologies, it's been such a long time since I posted, I had forgotten I can attach a file.

    I had thought of the vlookup formula but if there are more than one row in the original data I can't get them.

    The attached spreadsheet hopefully shows what I'm trying to achieve

    Kind regards
    Hayden

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Formula for Data Selection (2003)

    How about using the custom functions VLOOKUPALL or VLINDEX posted at Re: Lookup more than one row (2000)

    Steve

  5. #5
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    London, Gtr London
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formula for Data Selection (2003)

    Steve, thanks for your reply, I will try and digest it all

    Kind regards
    Hayden

Posting Permissions

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