Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Excel Countif

Options
  • 15-01-2022 4:36pm
    #1
    Posts: 61 ✭✭


    On sheet 1 is a column with ranges of amounts.

    These are in text form.

    -

    On another sheet I want to count the number of cells that match the text in the column from sheet 1.

    -

    An example of an amount, saved as text, in sheet 1 is: < €250k

    -

    How do I do a countif on sheet 2 that is counting all the < €250k in the column from sheet 1?

    -

    Thanks.



Comments

  • Registered Users Posts: 4,093 ✭✭✭smuggler.ie


    on first sheet

    =COUNTIF(Sheet2!A1:A120,"250")

    Sheet2!A1:A120 ->> sheet and range to be accounted for

    "250" ->> whatever text you have there to be accounted for

    edit: swap sheets as it suites you



  • Registered Users Posts: 1,147 ✭✭✭sundodger5


    Maybe i am misreading what you are asking but if the values are currency in text format will that not be a problem if looking for values less than 250k in the example you gave? unless the value is "< €250k"?



  • Registered Users Posts: 4,093 ✭✭✭smuggler.ie


    hmm, i double checked with actual "<€250k" - darn thing wont take it. It does not like symbol, take it away and it works then.



  • Posts: 61 ✭✭ [Deleted User]


    the value is "< €250k".

    Ill check this out later today, thanks Smuggler.



  • Registered Users Posts: 4,093 ✭✭✭smuggler.ie


    @9214

    Edit: it wont work with "<" ,">", "<>", "=" in the sample i have provided above or results wont be correct/reliable - those being operators in the function itself are interpreted by function as criteria defining symbol.

    I have tested bit modded version - seam to provide desired result and you can keep or whatever (you can change range(sheet) part as needed).

    A1:A10 ->> formatted as text, but even generic or currency made no different

    Still, test it before put in production.

    Note - cell A9 has: < space €250k - applied function doesn't.




  • Advertisement
  • Posts: 61 ✭✭ [Deleted User]


    Appreciate the help. Excel brings out the curiosity/stubbornness in a few of us:)



  • Registered Users Posts: 5 Spectral.Instance


    With an array formula*, you can count the number of cells even when they have inconsistent spacing:-

    *entered by pressing CTRL+Shift+Enter (instead of just Enter alone - this adds the {} which shouldn't be typed)



  • Registered Users Posts: 4,093 ✭✭✭smuggler.ie


    Good one.



Advertisement