+ Reply to Thread
Results 1 to 4 of 4

Formula to match data & Populate Column

Hybrid View

  1. #1
    Registered User
    Join Date
    06-08-2007
    Location
    Scotland
    MS-Off Ver
    Excel 2019
    Posts
    61

    Formula to match data & Populate Column

    Hi all...

    I'm pretty new to this, and am really struggling with this one... the Title of the post pretty much explains it and I've attached the xls with what is required in a text box.

    I don't see the point in trying to explain it in here as it would be pretty impossible to understand without actually seeing it.

    I'd be really grateful if anyone could come up with anything for this, even if it's VBA rather than a function, that's fine. There are actually around 8000 rows in the spreadsheet, but I've cut it down for the sake of file size.

    Thanks a lot.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    DekHog,

    In F try,

    =IF(E2="","",CHOOSE(MAX(IF($L$2:$O$10=E2,ROW($L$2:$O$10)))-1,$K$2,$K$3,$K$4,$K$5,$K$6,$K$7,$K$8,$K$9,$K$10))
    Entered as an array formula using Ctrl+Shift+Enter rather than just enter. When entered correctly the formula should appear with curly brackets {}around it.

    {=IF(E2="","",CHOOSE(MAX(IF($L$2:$O$10=E2,ROW($L$2:$O$10)))-1,$K$2,$K$3,$K$4,$K$5,$K$6,$K$7,$K$8,$K$9,$K$10))}
    Do not enter the brackets manually.


    HTH,

    Steve

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,703
    Similar suggestion....

    =IF(E2="","",IF(COUNTIF(L$2:O$10,E2),INDEX(K$2:K$10,MIN(IF(E2=L$2:O$10,ROW(K$2:K$10)-ROW(K$2)+1))),""))

    confirmed with CTRL+SHIFT+ENTER

  4. #4
    Registered User
    Join Date
    06-08-2007
    Location
    Scotland
    MS-Off Ver
    Excel 2019
    Posts
    61
    Cheers guys, both of them work fine... how the hell do you get to the stage where you can knock out formula's like that??

    It could be quantum physics written in Zwahili to me...

+ 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