+ Reply to Thread
Results 1 to 14 of 14

Match/Lookup Help

  1. #1
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Match/Lookup Help

    Hello,

    I am having trouble with creating the working logic for a spreadsheet. I have a list of ID that have corresponding values. What Im seeking to do is take the Employee ID and match it to a master list, once that location is found I want to take the adjacent value from the lookup list and substitute the value in the master list. I tried Match and lookups, with no success.

    The logic would be as follows:
    'Column B Employee Number Change
    'Column D New Contribution Change Value
    'Column G Employee Number Master List
    'COlumn H Contribution List

    'If ColB = ColG then Replace ColH with ColD


    I have a spreadsheet with several columns of data, I have simplified it to prove the desired concept. Eventually I would like to develop VBA code for the spreadsheet to perform the task by clicking a button.
    screen.gif

    Hope SOmeone can provide some insight in solving this issue.
    Attached Files Attached Files
    Last edited by penbeacho; 03-25-2015 at 03:01 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Match/Lookup Help

    Hi, welcome to the forum

    1st, Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff)

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    2nd, if you are trying to return a value based on criteria, you probably need to use vlookup()...

    A
    B
    C
    D
    1
    aa
    1
    bb
    2
    2
    bb
    2
    3
    cc
    3
    4
    dd
    4
    5
    ee
    5

    C1=search criteria
    D1=VLOOKUP(C1,$A$1:$B$5,2,0)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Re: Match/Lookup Help

    sorry about that I have attached a file.

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Match/Lookup Help

    what issue did you have with match / lookups..? seems to me this should work:

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

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


    it's also pretty easy in vba - here's one way:
    Please Login or Register  to view this content.
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  5. #5
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Match/Lookup Help

    I don't understand what you want to go where.

  6. #6
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Re: Match/Lookup Help

    Column G and H are Master list, i am trying to take the list from column B and match the values in column G once that is found i want to substitute the adjacent value in column D into the matching adjacent location in column H.

  7. #7
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Match/Lookup Help

    i must be lagging or something, suddenly saw several replies...

    it looks like perhaps you want to keep a running total? where you input a new contribution amount in column G and then hit update and that amount gets added to whatever was already in column D, is that correct?

    I'd suggest it's wise to keep the full record of all contributions and then you can just do a sumif() to get the cumulative total, but if you are set on replacing the amounts in column G with new amounts then you can modify my earlier code very slightly and i think accomplish what you're trying to do:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Re: Match/Lookup Help

    The closest thing I have to finding the location is the Match, but this tells me the value location relative to the search list value and not the actual location on the list, When trying to do this with a vlooukup I had #NAME Error show up.

  9. #9
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Match/Lookup Help

    in D2:
    =INDEX(G$2:H$17,MATCH(B2,G$2:G$17,0),2)

    Copy and paste down.

  10. #10
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Re: Match/Lookup Help

    I was able to find a similar logic using vlookup, the issue here was that this method finds the actual value on the h column while what I want to do is substitute the value from column d in its place. Column B is IDs for people that had a change, Column D are the changes. Column H should have the matching ID values substituted (fromD to H).

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Match/Lookup Help

    you want to replace an existing cell contents with something that a formula finds for you?

  12. #12
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Re: Match/Lookup Help

    I want to find the location of the id number in the master list, then I want to replace the adjacent cell value (column H) with the new value from column D. If you look at the larger file there is a sheet with how the master list should look when done.

  13. #13
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Match/Lookup Help

    it sounds like we all had your desired output reversed - all of our formulas find the ID in G and pull H into D... fixing that is as easy as switching the references around:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    or in vba
    Please Login or Register  to view this content.
    should all work
    Last edited by simarui; 03-25-2015 at 03:57 PM.

  14. #14
    Registered User
    Join Date
    03-25-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    34

    Re: Match/Lookup Help

    the formula worked beautifully!!! I will test the vba shortly. Thankyou!!

+ 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: 3
    Last Post: 06-17-2013, 12:37 PM
  2. Match/Index/Lookup - Searching From Bottom to Top (A reverse lookup maybe)
    By Neutralizer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-02-2013, 03:55 AM
  3. Replies: 7
    Last Post: 06-19-2011, 12:51 PM
  4. Replies: 5
    Last Post: 02-24-2011, 11:26 AM
  5. [SOLVED] Lookup? Match? pulling rows from one spreadsheet to match a text f
    By cjax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-21-2006, 09:51 AM

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