+ Reply to Thread
Results 1 to 12 of 12

LOOKUP and fill in data

  1. #1
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Goergia USA
    MS-Off Ver
    Excel 2007
    Posts
    102

    LOOKUP and fill in data

    [REVISED QUESTION, ALONG WITH ADDITIONAL SPREADSHEET POSTED BELOW]

    Hi everyone!

    I need some assistance with the following.
    I am tasked to fill in the attached SAMPLE spreadsheet using the data found in the 2003 sheet.

    Here's what I have to do:

    Look for each Transaction ID under Column A of the Matrix tab. Look for those numbers in the 2003 tab. If found in the 2003 tab, fill in the data in the Matrix sheet ((Dates, Quantity Total, Cost). If Transaction ID is not found in the 2003 tab, place N/A.

    I am not quite sure, but some transaction #s found in the Matrix tab may have multiple dates (or multiple quantities). Can this also be tabulated into the Matrix sheet (adding extra rows for these instances)?

    Please let me know if you have any questions. I hope that I have not made this more complicated in my explanation.

    Thanks so much for your help!
    Attached Files Attached Files
    Last edited by marshak; 01-25-2019 at 08:16 AM. Reason: Added Sample Excel File

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: LOOKUP and fill in data

    On the Matrix sheet, change the header in B1 to "Date_Applied" and get rid of the trailing space in C1 so it just reads "Quantity" rather than "Quantity ".
    Then put the below formula in B2 then copy right and down as required:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    There are no duplicate Transaction IDs in the sample data provided. You can easily check if your real data does have any by putting the below formula in P2 on the 2003 sheet and copying down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If any of the values are greater than 1 then it's a duplicate.

    If that is the case then attach an updated workbook showing a duplicate or two and manually create what you want it to look like after.

    It may be that you need to use helper columns or even VBA to get the desired result.

    BSB

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: LOOKUP and fill in data

    I suggest you go with pivot table.
    Only one thing, add one "Amount" column in 2003 sheet (p column) with =sum(k2*o2)
    Select complete data range > go to insert > click on table
    create pivot table > in row labels transaction_id & part_no
    in values : quantity, cost, amount.
    See attach file.
    When you add new data > go to pivot table > go to option tab > click on "Refresh All"
    your new data auto update.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: LOOKUP and fill in data

    Please amend your sheet to show HOW you want duplicates to be displayed...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Goergia USA
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: LOOKUP and fill in data

    Thanks so much! I will try both solutions now, and let you know.

  6. #6
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Goergia USA
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: LOOKUP and fill in data

    Okay, I have some clarification on what I need now. Thanks for being patient with me.

    Here's what I have to do:

    First thing....
    I have an Excel sheet of about 500,000 rows of data (Data). I have another Excel sheet with roughly 200 rows of data (Matrix). I need to look up the PART# found in A2 of Matrix and see if it occurs in any of the 500,000 rows of column A of Data.

    Second thing...
    If that PART# found in column A of Matrix is found in column A of Data, I need to extract the data from Data (DATE_APPLIED, QUANTITY, Cost) and place them into the same named columns found in Matrix.

    I have placed the following formula in cell B2, copied it across to cell D2, then down the rows...but it has not worked. Just gives me #N/A

    =INDEX('Data'!B2:D449112,MATCH($A2,'Data'!A2:A449112,0),MATCH(B$1,'Data'!B1:D1,0))

    What am I doing wrong? Am I using the best function to accomplish what I need to?

    I am attaching a sample size of the spreadsheet (I could not attach the entire file...was too large)

    This post is also posted under this forum:
    https://www.mrexcel.com/forum/excel-...x-vlookup.html
    Attached Files Attached Files

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: LOOKUP and fill in data

    In your sample... there are very few matches. However, use this, copied across and down:

    =IFERROR(VLOOKUP($A2,Data!$A:$D,COLUMNS($A:B),FALSE),"")
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Goergia USA
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: LOOKUP and fill in data

    Thanks so much for that formula. It is working great, with the exception of not catching a few matches. I have verified that my numbers are numbers (in both sheets). What can cause the formula not to pick up on a match?

  9. #9
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Goergia USA
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: LOOKUP and fill in data

    I have figured out the formatting issue that I mentioned above. The formula provided finds all of the matches now. I need some further help...

    Some of the Part #s found in the Matrix sheet have multiple matches in the Data sheet. Meaning, some Part #s have multiple Date_Applied entries. Is there a way to bring all of that data into the Matrix sheet.

    For example, if a Part # in the Matrix sheet has three Date_Applied entries (along with three Quantity and Cost entries), can Excel add 2 additional rows under that Part # and place the data into those rows? I am attaching a picture which shows Part# 137645 with 4 Date_Applied entries and the additional rows and data.

    Thanks again for your help.
    Attached Images Attached Images

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: LOOKUP and fill in data

    Quote Originally Posted by marshak View Post
    can Excel add 2 additional rows under that Part # and place the data into those rows?
    Yes it can, but you'd probably find this easier with VBA than with formulas alone.

    Just out of interest, why not put =COUNTIF(Matrix!A:A,A2) in E2 on the Data sheet (of your attachment in post#6) and copy down to the end of the data.
    You could then filter on column E to show anything greater than zero and the result will be what you're looking to create in the other sheet without any hassle.

    You could just copy and paste it into the other sheet.

    BSB

  11. #11
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: LOOKUP and fill in data

    Or you get result through pivot.
    In data sheet "E" column =row()-1
    Insert pivot table.
    See attachment.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Goergia USA
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: LOOKUP and fill in data

    You guys ROCK!! I was able to get the data that I needed in a quarter of the time, and made my deadline! THANKS SO MUCH to all of you!!!

+ 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. [SOLVED] Lookup and Fill
    By spider_min in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2018, 06:38 PM
  2. need to fill in data for holidays/weekends via lookup on another sheet
    By jslyuan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-10-2015, 12:29 AM
  3. [SOLVED] Formula to lookup data in one colum and fill the data into another column
    By kendra123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2014, 03:14 AM
  4. How to color-fill blank cells, then once data is entered cell is no-fill
    By hatemail13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 07:57 PM
  5. Formula to Automatically Fill Blank With Next fill cell's data?
    By VMoney in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-22-2013, 05:11 PM
  6. Lookup and Fill In
    By chconnol in forum Excel General
    Replies: 1
    Last Post: 05-13-2008, 01:14 PM
  7. [SOLVED] auto fill data into a cell from a lookup table
    By Tetradpoint in forum Excel General
    Replies: 1
    Last Post: 04-19-2005, 12: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