+ Reply to Thread
Results 1 to 4 of 4

Countif not quite what I am looking for?

  1. #1
    Registered User
    Join Date
    03-28-2023
    Location
    London
    MS-Off Ver
    Microsoft 365
    Posts
    2

    Question Countif not quite what I am looking for?

    So I have a sheet which and in columns M, O, Q, S, U & W in row 6 I have the text "6A". In the columns L, N, P, R, T, V there is writing, sometimes this writing would be "in use for X" but other times it is just "spare".

    What I want is a formula to count all the cells in row 6 that have "6A" text in and only count them if the box next to it says "spare".

    My latest attempt has been =COUNTIFS(L7:W7,"spare",L7:W7,"6A") but this just give me 0

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Countif not quite what I am looking for?

    You can use this formula in Y2:

    =COUNTIFS(L2:W2,"6A",M2:X2,"spare")

    Note that the ranges are offset by one cell, but still the same size.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,265

    Re: Countif not quite what I am looking for?

    Try

    =SUMPRODUCT(($M2:$W3="6A")*($L2:$V3="spare"))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    03-28-2023
    Location
    London
    MS-Off Ver
    Microsoft 365
    Posts
    2

    Re: Countif not quite what I am looking for?

    Thank you - that worked!!

+ 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] COUNTIF and SUMPRODUCT. Multiply each row with COUNTIF if the condition is met.
    By Fishtail in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-23-2023, 04:29 PM
  2. [SOLVED] Countif on visible cells only & Countif from a cell with multiple entry
    By MushroomJ in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-26-2021, 05:37 AM
  3. [SOLVED] Help with countif formula for calendar (countif any date in table present)
    By KMJ256388 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2021, 12:11 PM
  4. Replies: 5
    Last Post: 08-12-2020, 05:33 PM
  5. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  6. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  7. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 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