Share via

COUNTIFS error when using named range

Anonymous
2022-06-28T16:58:56+00:00

OK so this is driving me nuts I just can't see it, this was a test for a job I had hoped to get but that's a fail but for personal satisfaction I want to fix this.

Working formulae

=COUNTIFS(Data!G2:G539,C174,Data!F2:F539,B174)

this works but I have created a named range that covers Data!G1:G529 and called it TRANS_MONTH as it covers transaction months so I created this formulae

=COUNTIFS(TRANS_MONTH,$C174,Data!$F$2:$F$539,$B174)

this returns #VALUE error

Can anyone advise me what the heck I should do, I have tried changing the reference range to exclude the first row that has the label in so it refers to G2:G539 as it was originally included, this made no difference

Microsoft 365 and Office | Excel | Other | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2022-06-28T17:09:58+00:00

You messed up with the definition of the named range - as long as it is the same size (number or rows/columns) as the second range, the use of a named range will work fine.

Was this answer helpful?

4 people found this answer helpful.
0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2022-06-28T17:17:16+00:00

    As our colleague, Bernie rightly pointed out, the Ranges in the formula must be the same size

    The named range TRANS_MONTH is now from row 1 to 529 so the formula should be

    =COUNTIFS(TRANS_MONTH,$C174,Data!$F$1:$F$539,$B174)

    Regards

    Jeovany

    Was this answer helpful?

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more