+ Reply to Thread
Results 1 to 6 of 6

Trying to count number of occurances based on multiple named ranges.

  1. #1
    Registered User
    Join Date
    05-23-2018
    Location
    ny
    MS-Off Ver
    2014
    Posts
    4

    Trying to count number of occurances based on multiple named ranges.

    Hi all,
    New to this forum so appreciate any help you can provide.

    I have names in multiple rows in columns M:U named (Data) as well as in column V named (Final)

    I also have two separate named ranges - (Primary) which only contains one cell

    and (Secondary) which contains many names.


    I am trying to count the number of times (Primary) is in (Data) when any of the names in (Secondary) ARE NOT in (Final).

    Please see the attached spreadsheet.

    I ultimately need to make this work in google sheets but any help in excel would help as a start.

    Thanks!
    Last edited by spangleyguitar; 05-24-2018 at 12:17 AM.

  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
    52,929

    Re: Trying to count number of occurances based on multiple named ranges.

    Hi, welcome to the forum

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    05-23-2018
    Location
    ny
    MS-Off Ver
    2014
    Posts
    4

    Re: Trying to count number of occurances based on multiple named ranges.

    Thank you - I have added an example

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Trying to count number of occurances based on multiple named ranges.

    Try this:

    =SUMPRODUCT(--(MMULT(--(Data=H2),{1;1;1;1})>0),--ISNA(MATCH(Final,I2:I3,0)))

  5. #5
    Registered User
    Join Date
    05-23-2018
    Location
    ny
    MS-Off Ver
    2014
    Posts
    4

    Re: Trying to count number of occurances based on multiple named ranges.

    Thank you for Responding!

    This does in fact work with my sample data.

    However when I try to apply it to my larger data set I receive an error saying 'MMULT has incompatible matrix sizes. Number of columns in first matrix (9) must equal number of rows in second matrix (4)'

    I am not very familiar with MMULT or how to fix this.

    Thanks in advance.

  6. #6
    Registered User
    Join Date
    05-23-2018
    Location
    ny
    MS-Off Ver
    2014
    Posts
    4

    Re: Trying to count number of occurances based on multiple named ranges.

    Actually I got it - Thanks for the help ! Resolved

+ 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] Assign different named ranges based on variable number of entries
    By BrotherNeptune in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-17-2015, 10:15 AM
  2. count number of occurances in table based on criteria
    By BillDoor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2014, 09:57 AM
  3. [SOLVED] Count occurances based on very specfic criteria from multiple cells (excel 2003)
    By Ash Ford in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-10-2013, 09:02 AM
  4. Creating a dynamic set of Named ranges, based on the row count.
    By sdingman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-23-2013, 11:32 AM
  5. Replies: 1
    Last Post: 10-07-2012, 09:56 PM
  6. Replies: 5
    Last Post: 05-11-2012, 03:38 AM
  7. Replies: 0
    Last Post: 02-02-2012, 05:38 PM

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