+ Reply to Thread
Results 1 to 14 of 14

vLookupAll output to multiple rows instead of multiple values in cell?

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    vLookupAll output to multiple rows instead of multiple values in cell?

    Hello, i'm wondering how to change the output of this function

    instead of X | 1, 2, 3

    to

    X | 1
    X | 2
    X | 3

    Please Login or Register  to view this content.
    your help is appreciated
    Last edited by s_t_e_i_n; 10-01-2012 at 01:38 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    attach please a samplefile with input and output table
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Hi, s_t_e_i_n,

    if used as UDF in a worksheet you would need to mark the cells in advance and rewrite the Function to suit - but then you would not need this Function but one which delivers the hit for the adequate cell number.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    09-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    please see attached
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Please Login or Register  to view this content.
    Last edited by patel45; 09-28-2012 at 08:38 AM.

  6. #6
    Registered User
    Join Date
    09-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Sorry, not sure what to do with a subroutine? I was hoping to have it work as part of the vlookupall function?

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Hi, s_t_e_i_n,

    Iīm really curious on the modified function patel45 will present as a solution and his description on how to use it.

    Ciao,
    Holger

  8. #8
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    my code is the answer to the first post, see attached
    maybe I misunderstood the question
    Attached Files Attached Files
    Last edited by patel45; 09-29-2012 at 05:10 AM.

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Hi, patel45,

    TO shows us a function and asks for another way to present the data. To my opinion nobody needs a function if a procedure is used as well (if so this procedure should include what the function does and not make it necessary that both are used).

    my code is the answer to the first post, see attached
    Agreed but according to the code posted here itīs a static solution that will not update if any changes are made in the formula - it needs to be started again.
    Please Login or Register  to view this content.
    appears two times in the code (to my reading should only do so the second time).

    regio can be left out, you may rely on the cells themselves (since itīs only used once after assigning a value to it). And maybe change the Column from a static A to either a parameter passed to the procedure (or less favourite to my taste ActiveCell.Column which should make an error handling mandatory).

    Ciao,
    Holger

  10. #10
    Registered User
    Join Date
    09-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Yes, I am looking for the modified function to output into new rows

  11. #11
    Registered User
    Join Date
    09-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    is it possible to modify the function?

  12. #12
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Hi, s_t_e_i_n,

    do you want to re-invent the wheel? Find the nth Occurrence of a Value might be what you are looking for.

    Ciao,
    Holger

  13. #13
    Registered User
    Join Date
    09-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    what I'm looking for is how to change the output of this "vlookupAll" function

    instead of

    | X | 1, 2, 3 |

    to

    | X | 1 |
    | X | 2 |
    | X | 3 |

    Possibly this is re-inventing the wheel

  14. #14
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: vLookupAll output to multiple rows instead of multiple values in cell?

    Hi, s_t_e_i_n,

    as far as I know any Function called from within a cell on a worksheet cannot have an effect on other cells. You would need to include any information for Excel/VBA which nth occurrence to find - of course the given Function could be rewritten (but wouldnīt it need another parameter to give a clue which value to "deliver" to the cell from which it is called?).

    Ciao,
    Holger

+ 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