+ Reply to Thread
Results 1 to 6 of 6

Countif with a range an criteria declared in a let statement,

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Countif with a range an criteria declared in a let statement,

    Hi, is it possible to get countif to work with ranges declaed in a let statement,

    Please Login or Register  to view this content.
    K3 = spill from filter,

    But what I have tried to do is put this into a let statement and then use it
    Please Login or Register  to view this content.
    but this results in an error? I have managed to use match,

    So my question is, is there a way to get countif to work with the ranges and filter spill named in a let statement?
    If it can't be done at least I can stop trying.

    Richard
    Attached Files Attached Files
    Last edited by Dicken; 06-05-2024 at 08:54 AM. Reason: More information

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

    Re: Countif with a range an criteria declared in a let statement,

    What are your expected results?
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Countif with a range an criteria declared in a let statement,

    Sorry, I'll edit it , I wanted to find a way to get countif to handle the values in the let statement, I don't know if it can.

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

    Re: Countif with a range an criteria declared in a let statement,

    I think you need this:

    Please Login or Register  to view this content.
    COUNTIF(S) won't work with arrays (only ranges).
    Attached Files Attached Files
    Last edited by AliGW; 06-05-2024 at 09:28 AM. Reason: Typo fixed.

  5. #5
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Countif with a range an criteria declared in a let statement,

    Thanks, had not got as far as trying a lambda, i had found a few ways round it,
    one using multiple textsplits,

    Please Login or Register  to view this content.
    but not the best way, anyway thanks for info re Countif,

    Richard.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,978

    Re: Countif with a range an criteria declared in a let statement,

    Glad to have helped.

    Thanks for the 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] how set range using two declared integer variables and use the range to paste the data
    By Sum in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2023, 10:55 AM
  2. CountIF Statement with multiple criteria using the Today() Function
    By tkelbel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-07-2019, 09:39 AM
  3. [SOLVED] CountIF two range, two criteria
    By bryanhope in forum Excel General
    Replies: 3
    Last Post: 07-21-2017, 06:29 PM
  4. Using declared range in .SetRange
    By MisterPan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2014, 02:32 PM
  5. Range of Criteria for COUNTIF
    By jtalman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2013, 12:52 PM
  6. COUNTIF statement with 3 criteria checks
    By Malvaro in forum Excel General
    Replies: 4
    Last Post: 06-04-2006, 06:45 PM
  7. [SOLVED] Can criteria in countif statement be a color?
    By aosbor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-23-2005, 05:20 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