+ Reply to Thread
Results 1 to 5 of 5

Finding largest value in subsequent column from matching ID numbers

  1. #1
    Registered User
    Join Date
    11-25-2011
    Location
    Budapest, Hungary
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Finding largest value in subsequent column from matching ID numbers

    Hello,

    I've been trying to find a similar problem on the forums but I can't see it, sorry if this is a duplicate.

    I'm making a spreadsheet and I need to combine the data in several rows to one row and delete the duplicates.

    I have three basic fields that i need to combine at the moment, Shipment, Lplant and RecPl.

    The problem is sometimes the lplant is not on the first line, and sometimes I need to take the details from the RecPl column. Also, the data might be a combination of letters and numbers, and sometimes just numbers

    So far i've tried doing an if and vlookup combo but that only returns the first value that matches the shipment number, and it doesn't check the second column.

    I've attached (hopefully ) a spreadsheet with an example of the formula and some data to show what i mean.

    Can someone help please? I don't know if I need a macro or a formula to do this, either is fine by me.

    Thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Finding largest value in subsequent column from matching ID numbers

    what you want is not clear
    if you had given a few results int would have been helpful


    from your data do you want the result like this


    Shipment LPlant RecPl Formula
    1 OA50 40 filled
    2 518 518 filled
    3 518 0
    etc etc

    confirm

  3. #3
    Registered User
    Join Date
    11-25-2011
    Location
    Budapest, Hungary
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Finding largest value in subsequent column from matching ID numbers

    Hi and thanks for replying!

    Sorry for not being clear.

    Basically what i need is if the first cell in column B for a particular shipment number is blank, it should be filled with the Lport ID if it exists, and if there is nothing in the Lport for that shipment number it should take the RecPl data.

    So
    Shipment LPlant RecPl
    11 145
    11 145 1000572
    would become
    Shipment LPlant RecPl
    11 145 145
    11 145 1000572
    and
    Shipment LPlant RecPl
    3
    3 518
    would become
    Shipment LPlant RecPl
    3 518 518
    3 518
    So that all the data is on one line.
    I've used an extra column at the moment with the formula i could think of, and i thought i could copy it into the LPlant and RecPl cells after with a macro, and delete duplicates.

    The "Filled" is not necessary, just a comment so i know i don't need to do anything with that line.

    Is that clearer at all?

    Thanks!

    ETA: Unfortunately the white spaces don't seem to show in the comment when i post so please find attached a spreadsheet with what i wanted to show

    Of course like i said, it should be possible for it to return even if it's letters in it, otherwise it seems i could do most of it with a sumif.

    thank you!
    Attached Files Attached Files
    Last edited by Norsemermaid; 11-25-2011 at 09:28 AM.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Finding largest value in subsequent column from matching ID numbers

    Still your requirement is not clear. Pl seeattached file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-25-2011
    Location
    Budapest, Hungary
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Finding largest value in subsequent column from matching ID numbers

    Hello,
    I found a way of doing it using sorting functions, thank you all! :-)

+ 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