+ Reply to Thread
Results 1 to 20 of 20

Help with V lookup Function with Multiple Criterias

  1. #1
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Help with V lookup Function with Multiple Criterias

    Hello Everyone!

    I receive a weekly excel file with more than 500 rows with multiple entries for a particular pt ID on specific date with data for right, left and both eyes; I need to re-structure it from a column orientation to a row orientation. I thought that using a v lookup will help me to accomplish, but it is more complicated than that. (don't know if i'm explaining myself clear),but I attached a sample of the data for anyone willing to help.

    I receive the data the same as table 1 and need to change it to looks like table 2.

    from table 1 the laterality column become the header and corresponding values gets transpose from column orientation to row orientation.


    Thank you in advance for any help or guidance on how to deal whit it.


    Respectfully,

    Alex
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    Alex - firstly, there is no such product as Office 360. I presume you have Office 365 (days in a year, not degrees in a circle) - you might wish to update your user profile accordingly.

    Secondly, this can be done in PowerQuery. Select the table and load it into PQ, then pivot on the left/right column using the column to its right as the value - set to no aggregation.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Hi AliGW,

    Thank you very much for pointing out my profile error, corrected already.

    Thank you for your suggestion but i never used Power Query before, I guess I will have to learn it and see if I can follow your instructions.

    Respectfully,

    Alex

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    OK - here's what you need to do:

    1. In the original workbook (not my copy) select the whole of your source table (A2 to D23).
    2. With this range selected, go to the Data ribbon and click on From Table/Range in the Get & Transform area of the ribbon (on the left). This will load the table into PowerQuery.
    3. Select the Laterality column by clicking on its header, then on the Transform ribbon, select Pivot.
    4. In the dialog that opens, make the Values column Visual Acuity and in the Advanced Options choose Don't Aggregate - click OK.
    5. Finally, click on the downward arrow of the Close & Load button at the far left of the Home ribbon - choose existing sheet and click on the cell where you want the table to appear.

    All you need to do now is remember to refresh the table when changes are made to the source table (Refresh on the Data ribbon). This can be automated by setting auto-refresh in the query properties. To access the query properties, click Queries & Connections on the Data ribbon, then right-click the query in the pane that appears to the right and choose Properties.

    You can step through the stages set up in the query to see what was done to reshape the data.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Good Morning AliGW,

    You got the results I was looking for! and your instructions are very easy to follow, but in my version of Excel I don't see the "From Table/Range in the Get & Transform area" of the ribbon. I do have "Get External Data", Connection", Sort and Filter", Data Tools and outline.

    Respectfully,

    Alex

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    It must be there - you have Office 365.
    Attached Images Attached Images
    Last edited by AliGW; 04-25-2019 at 06:49 AM.

  7. #7
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Hi,

    I have it at home, but at work I have Microsoft Office Professional Plus 2013.

    But the IT already installed on my PC!

    will follow your instructions.

    Thank you Very much for your invaluable help!!

    Respectfully,

    Alex

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    OK - so if the IT guys have now installed PQ for you, you should be able to find the options on the PQ add-in ribbon.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    I will, but it have been working for 20 min now and not result.

    I'm doing something wrong?

    Respectfully,

    Alex

  10. #10
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    still loading....

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    Impossible to say - I am not clairvoyant.

    If you would like to give more details of what you have done, what has happened and what has gone wrong, then maybe I can try. Bear in mind I am not working with the PQ add-in, so there will be some subtle differences in the interface.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    Quote Originally Posted by AlexOdou View Post
    still loading....
    How many rows of data are you trying to process??? 500 or so should not cause any issues.

  13. #13
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Not, i'm just trying the sample i sent first.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    It should not be causing any problems. You must have done something wrong. It processed instantly here.

  15. #15
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Definitely,

    will make a new sample and start all over again.

    Thanks for your help and time, i really appreciate it!!

    Respectfully,

    Alex

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    OK - let us know how you get on.

  17. #17
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Hi,

    Still having problem with the PQ on my work computer running Office Professional Plus 2013, the IT is investigating.

    anyway, using my personal comp running the 365, I was able to load the test into the PQ, but for the next step :

    3. Select the Laterality column by clicking on its header, then on the Transform ribbon, select Pivot, in the transform ribbon i don't see "Pivot"

    Thank you very much for your help.

    Respectfully,

    Alex

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    On the Transform ribbon in the PQ workspace - it's about halfway along.
    Attached Images Attached Images

  19. #19
    Registered User
    Join Date
    03-08-2019
    Location
    Maryland
    MS-Off Ver
    OFFICE 365
    Posts
    39

    Re: Help with V lookup Function with Multiple Criterias

    Found it!

    It works perfectly!

    Thank you very much for your patient with me. you have been wonderful!

    The PQ is a powerful tool, i need to master it.

    thanks again for pointed me to this new tool. i will mark this threat as solved.

    Respectfully,


    Alex

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with V lookup Function with Multiple Criterias

    It's a real Pandora's Box! Glad to have helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 02-23-2018, 07:09 PM
  2. Counting function with multiple criterias
    By etaver87 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-04-2016, 12:30 PM
  3. [SOLVED] Returning row value based on multiple criterias in array (not tables). IF ? Lookup ?
    By KomicJ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-02-2016, 05:08 AM
  4. Lookup with 2 different criterias
    By frostie77 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-13-2012, 10:14 AM
  5. How to use lookup function with multiple criterias?
    By surfol in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-27-2009, 03:43 AM
  6. 2 Criterias, 2 Sheets lookup?
    By banquo_ws in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-24-2007, 01:35 PM
  7. [SOLVED] Lookup with 3 criterias
    By Ginger in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-30-2005, 05:06 PM

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