+ Reply to Thread
Results 1 to 9 of 9

Index Matching + ranged CountA

  1. #1
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    55

    Index Matching + ranged CountA

    Hi guys, thanks in advance.

    As always, attached is an example for reference and I will walk through what I am trying to do using the attached example.

    Issue: What formula would I use to do index matching to look up and count the number of products in a range? (note, it will be index matching in another workbook, so it needs to reference the other workbook).
    Here's my example:

    I need a formula to reference the code in column A to look up the code in column D (the black bar is meant to visually represent that columns d-s are a different workbook) and count the number of x's (products) in range E:S. The number of products should be returned in column B (where the ? is). Unfortunately it wont actually be that easy because its going to be something like count the number of x's (products) in columns E:I and O:Y, meaning there is a break of 5 columns it would actually be counting (not represented in this example). I'm not sure if that makes a difference for the formula.

    Also, as you can see, the codes in column D are in no particular order. Preferably I would like to leave the data the way it is arranged and not have to sequentially order the codes. There are a total of 70 codes, but I would like the formula to reference 100 rows total, so rows 2:102. After code 70, no more codes are input. I just added a little buffer into the range.

    In this example, cell B2 should return a value of 4, since there are four x's in E15:S15 (note the code in column D).

    Thank you so much!!!


    Excel Forum Help.xlsx
    Attached Images Attached Images
    Last edited by UHD; 07-20-2017 at 08:06 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Index Matching + ranged CountA

    Please attach a file so that we could assist in your request. Thanks

  3. #3
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    55

    Re: Index Matching + ranged CountA

    I did. It is the blue link at the bottom. If you click the link, a picture appears. Thank you, that was a super quick response.

  4. #4
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    55

    Re: Index Matching + ranged CountA

    bump, still looking for an assist :s

  5. #5
    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,410

    Re: Index Matching + ranged CountA

    No workbook attached. We can't work with a picture of one - we need the real thing.
    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.

  6. #6
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    55

    Re: Index Matching + ranged CountA

    Thanks for that tidbit Ali! My apologies, I've always posted a picture before.

    As in the picture, I'm trying to create a code that references the code in column A (sheet 1), looks up the same code in column c (sheet 2), counts the number of products (x's D:R, sheet 2), and then returns the correct value in column B (sheet 1). As an example, cell B11 sheet 1 should return a value of 3. Workbook is attached in the original post.

    Excel Forum Help.xlsx
    Last edited by UHD; 07-20-2017 at 08:07 AM.

  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,410

    Re: Index Matching + ranged CountA

    In B2 copied down:

    =COUNTA(INDEX(Sheet2!$D$2:$R$101,MATCH(A2,Sheet2!$C$2:$C$101,0),0))

  8. #8
    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,410

    Re: Index Matching + ranged CountA

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Registered User
    Join Date
    10-27-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Index Matching + ranged CountA

    4 years on and this solved my problem! Thank you very much Ali

+ 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. Counting non-blanks (CountA) of a matching cell's row
    By hawaean in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2017, 07:34 AM
  2. [SOLVED] COUNTA & INDEX formula not working
    By adamheon in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-01-2016, 10:11 PM
  3. Vlookup in conjunction with Index and CountA function
    By manning457 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2015, 02:26 PM
  4. [SOLVED] named ranged - offset & counta
    By milo1984 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2014, 02:13 AM
  5. [SOLVED] IF & INDEX Formula =INDEX(D11:D59,COUNTA(D11:D59),1)
    By GC1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2013, 08:11 AM
  6. [SOLVED] help w/formulas (index, counta, and choose)
    By linksavage in forum Excel General
    Replies: 4
    Last Post: 01-23-2011, 01:37 AM
  7. sum with counta & countif with many matching criteria
    By Ramzes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2010, 03:56 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