+ Reply to Thread
Results 1 to 11 of 11

Combine vlookup, match and countifs

  1. #1
    Registered User
    Join Date
    07-14-2022
    Location
    singapore
    MS-Off Ver
    MS365
    Posts
    9

    Combine vlookup, match and countifs

    Hi I need help to transform sheet 1 data to sheet 2 format. Does anyone know of a formula that i can key into cell B2 of sheet 2? Preferably a single formula that I can key into cell B2 of sheet 2 then drag it across to D5!
    Was thinking of combining vlookup, match and countifs but wasn't sure how should I present them as an equation.
    Thanks!
    Attached Files Attached Files
    Last edited by johnn123; 07-14-2022 at 04:39 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Combine vlookup, match and countifs

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT a release number like 2206) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Combine vlookup, match and countifs

    Put this in B2 on Sheet2 then copy right and down as required.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note, all instances of "Watermelon" on Sheet1 have trailing spaces so you'll need to tidy those up to get the correct figures in column D on Sheet2.

    BSB

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Combine vlookup, match and countifs

    You can use UI clicks in PowerQuery (Get & Transform).

    M Code:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,401

    Re: Combine vlookup, match and countifs

    Worksheet or Tab name : Sheet2

    Cell B2 formula , Drag down and across

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

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Combine vlookup, match and countifs

    Hey. Your MS Office version is a bit odd but it's the same build as mine I think so I'm assuming you're on O365? If so, the following in A1 of the second sheet might work for you:

    Please Login or Register  to view this content.
    This formula generates the whole array with the first column and first row filled in - no other copying across or down required.

    WBD
    Office 365 on Windows 11, looking for rep!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Combine vlookup, match and countifs

    @WBD

    The Office version has now been clarified - it's MS365.

  8. #8
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Combine vlookup, match and countifs

    Yeah. I guessed as much. The OP was actually using information from their "About Excel" which, on mine, says "Version 2206 (Build 15330.20230 Click-to-Run)" so it's a reasonable mistake to make. Anyway, it's the first time I've used MAKEARRAY with a LAMBDA function so I was very excited. I live a sad life ...

    WBD

  9. #9
    Registered User
    Join Date
    07-14-2022
    Location
    singapore
    MS-Off Ver
    MS365
    Posts
    9

    Re: Combine vlookup, match and countifs

    It worked! thanks!

  10. #10
    Registered User
    Join Date
    07-14-2022
    Location
    singapore
    MS-Off Ver
    MS365
    Posts
    9

    Re: Combine vlookup, match and countifs

    Thank you! This worked!

  11. #11
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,401

    Re: Combine vlookup, match and countifs

    @johnn123 You're Welcome. Glad to help . Thank You for the feedback and rep.

+ 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] Combine vlookup or index/match with offset
    By Simon1185 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-31-2017, 03:37 PM
  2. VLOOKUP Formula -- maybe can combine with MATCH or change entirely
    By Spinette in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-11-2015, 06:04 AM
  3. How to combine IF, VLOOKUP and MATCH?
    By Shreyaanand in forum Excel General
    Replies: 3
    Last Post: 09-23-2015, 05:55 AM
  4. How do I match and combine data using VLookup?
    By sunshine123 in forum Excel General
    Replies: 11
    Last Post: 05-04-2015, 11:19 PM
  5. [SOLVED] Match & Vlookup combine?
    By Laurianne03 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-07-2013, 04:20 PM
  6. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  7. How to combine IF, VLOOKUP and MATCH?
    By stormracela in forum Excel General
    Replies: 9
    Last Post: 05-17-2010, 03:17 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