+ Reply to Thread
Results 1 to 7 of 7

Need to pull different values based on text from one sheet to another

  1. #1
    Registered User
    Join Date
    11-27-2018
    Location
    Scotland
    MS-Off Ver
    2016
    Posts
    4

    Need to pull different values based on text from one sheet to another

    Morning/Afternoon/Evening All,

    For starters it has been over a decade since I did anything constructive on excel and I'm not afraid to say that excel has come a long way since then and I have basically forgot what I knew.

    I have a list of over 1000 items in my warehouse (The list would also be ever expanding on a weekly basis with new models). Each of these items has a designated weight. A sample list of the items and weights are in TEST WEIGHTS

    I am currently separating each worker (17 of them) and adding in the weight of the item separately. The relevant items for the driver then goes to a word document and gets signed by the drivers so they can go out on the road.

    The report I run has multiple useless columns which I remove for the final excel table. I am happy to keep these in if it makes it easier and just minimize them. The report that runs is TEST. I am after the weights of the items to populate column AH automatically based on the model that is in column Y. (If it needs to be AI that is populated that is fine) I have removed all confidential data and replace with "a" but that's the only change made.

    I realize this is a big ask as everything I have found to help can recognize the data in Column Y and add a set value but I need it to add to representative weight of that item.

    The TEST WEIGHTS is only a selection of what is here and if it made it easier I could paste that into a 2nd tab on the report if that made it easier. I hope I have explained this correctly, any questions please ask.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need to pull different values based on text from one sheet to another

    In AH2 put this formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This assumes both files are in the same folder.

    and copy down. Then do whatever other processing you normally do. You said you have 1000 items; this is good for up to 10,000. Because you are using a .xls file, you can only reference up to 65,536 rows so we have to put an explicit row number in the formula ($A:$B would imply about a million rows).
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Need to pull different values based on text from one sheet to another

    In AI2 =VLOOKUP(Y2,'[TEST WEIGHTS.xlsx]Sheet1'!A$2:B$197,2,0) and copy down.

    This assumes that both worksheets are open.

    EDIT: Jeff types faster.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    11-27-2018
    Location
    Scotland
    MS-Off Ver
    2016
    Posts
    4

    Re: Need to pull different values based on text from one sheet to another

    This has worked but only up to a point. This is ran daily and is different items in different orders on a daily basis. The formula has stopped working as soon as it hit something that wasn't in the same order as the TEST WEIGHT list. Would me saving it as a different extension mean better results or enable different options?

  5. #5
    Registered User
    Join Date
    11-27-2018
    Location
    Scotland
    MS-Off Ver
    2016
    Posts
    4

    Re: Need to pull different values based on text from one sheet to another

    Alansidman - This one has worked and seems to be perfect. If I were to extend the list in TEST WEIGHTS all I would have to do is alter the "197" in the formula to represent the last used row, yes?

  6. #6
    Registered User
    Join Date
    11-27-2018
    Location
    Scotland
    MS-Off Ver
    2016
    Posts
    4

    Re: Need to pull different values based on text from one sheet to another

    Honestly guys, thank you for this. Solved within a day and you have saved literal weeks worth of man hours per year. Thank you.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need to pull different values based on text from one sheet to another

    Quote Originally Posted by Mistah Jay View Post
    The formula has stopped working as soon as it hit something that wasn't in the same order as the TEST WEIGHT list.
    It should look for an exact match regardless of order. If you're having a problem it's not related to the order. Double check that the formula matches the above.

    Quote Originally Posted by Mistah Jay View Post
    Alansidman - This one has worked and seems to be perfect. If I were to extend the list in TEST WEIGHTS all I would have to do is alter the "197" in the formula to represent the last used row, yes?
    Yes.

    The only difference between the two formulas is the number of rows. Otherwise you should get equivalent results.

+ 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. Filter Based on Text in Cell, Return Values on Same Sheet
    By potatoman54 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2016, 02:16 PM
  2. Replies: 7
    Last Post: 02-12-2016, 05:30 AM
  3. Replies: 1
    Last Post: 04-20-2015, 03:18 PM
  4. Formula to pull data from one sheet to a new sheet based on date range
    By lisajolley11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2015, 08:38 PM
  5. [SOLVED] VBA to pull data from worksheet to a new sheet based on specific text cell value
    By TalResha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2013, 02:11 AM
  6. Replies: 1
    Last Post: 04-04-2013, 02:47 PM

Tags for this Thread

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