+ Reply to Thread
Results 1 to 13 of 13

help with Countifs and array

  1. #1
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    help with Countifs and array

    Hi, newbie needing some help... (see attachment)

    I have 4 columns of data I need to use at the moment... I am looking to do the following:
    - if a row contains "999" or 101, 102, 104, 105, 107, or 108 in any of the 4 columns (F:I), I want the empty column tot he right to show "1"

    column H & I would be exactly those numbers, where F & G may contain something like xyz999

    Ive started a formula that will work for counting the 999, but cant get the rest... and not sure how to make it count as only "1" and not 3 if there are multiple 999/or 102... in the row
    Attached Images Attached Images
    Last edited by spenny32; 01-17-2019 at 06:24 PM.

  2. #2
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: help with Countifs and array

    Create a helper list with the values you're looking to see if they're in your range. In this formula; it's a named range called LIST


    Place this into J15:
    Please Login or Register  to view this content.
    and copy down.

    Pete
    Last edited by PeteABC123; 01-15-2019 at 04:59 PM.

  3. #3
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    Re: help with Countifs and array

    Thanks Pete!

    So for cell G15 (TAH9999), this is also a default code... usually they are 999 but can vary... can I add to this formula to make it pick up any instances of 999?

  4. #4
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: help with Countifs and array

    Sure spenny32. I don't see why not. Add TAH9999 to your LIST, if I catch the drift.
    Pete

  5. #5
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    Re: help with Countifs and array

    Hi Pete, this would work, however the amount of potential haulers would make the helper list quite a task to make for 8 different plants... is there a way to use a wildcard in there or some other variation to pick up only the 999 portion?

  6. #6
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: help with Countifs and array

    Try this:
    Please Login or Register  to view this content.
    Pete

  7. #7
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    Re: help with Countifs and array

    perfect!! thanks so much for the help, this is working

  8. #8
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: help with Countifs and array

    Great! If it's all done and happy, feel free to mark this thread as SOLVED.

    Glad to help.
    Pete

  9. #9
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    Re: help with Countifs and array

    so close... one more hiccup

    attached image to show formula - it is counting the *999* but if there is one of the defaults (ie 102) it will not calculate in the helper row. Tried just making it a COUNTIFS and using an array but that did not seem to work either. Any thoughts?
    Attached Images Attached Images

  10. #10
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: help with Countifs and array

    You'll still need to create the named range somewhere in your worksheet, which I referred to as LIST, and have the values 102 103 etc. represented there.

    If you've done that spenny32 and it's still got the hiccups, can you post a sanitized worksheet archetype of this peevish rascal?
    Tanks.

    Pete

  11. #11
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    Re: help with Countifs and array

    Thanks so much for the help! see attached (i did create the named range "default" to the far right column)
    Attached Files Attached Files

  12. #12
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: help with Countifs and array

    Those varmints! Hi: You'll need to include column "I" in your formula.
    Try this in J2:
    Please Login or Register  to view this content.
    Copy down.

    Cheerio pip pip

    Pete

  13. #13
    Registered User
    Join Date
    12-28-2018
    Location
    BC Canada
    MS-Off Ver
    MS Office 360
    Posts
    16

    Re: help with Countifs and array

    Heavens to Murgatroyd... thank you!

+ 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. COUNTIFS + Array?
    By ktennies in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2018, 10:03 PM
  2. CountIFS With Array
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2017, 02:20 AM
  3. Countifs on an Array Range using multiple criteria in an Array
    By Mysore in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2016, 04:39 PM
  4. COUNTIFS + OR (array tray) not working
    By Lugashz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-14-2015, 10:52 AM
  5. VBA countifs within ARRAY
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-19-2015, 04:41 AM
  6. [SOLVED] Array functions & COUNTIFS (or alternative f-n)
    By akamenov88 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2015, 03:51 PM
  7. Countifs multiple criteria array
    By lamdl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2014, 09:18 PM

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