Share via

Countifs Error- Wrong data type

Anonymous
2016-09-30T20:08:25+00:00

Hello,

I am trying to run a countifs formula and am experiencing a strange error. Here is my formula:

=COUNTIFS(F1:F326569, "*5 Mealplan*", AX2:AX326569, "*PH Dinner*")

I get the error "A value used in the formula is the wrong data type."

The interesting thing is, when I run the statements separately where:

cell 1 = COUNTIF(1:F326569, "*5 Mealplan*")

cell 2 = COUNTIF(AX2:AX326569, "*PH Dinner*")

I do not get any error and appropriate separate counts are displayed in each cell. The problem is I need to count if the row meets BOTH criteria. I have tried changing the format type of the cell but it does not work. 

Any help would be greatly appreciated.

Microsoft 365 and Office | Excel | For home | Windows

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

2 answers

Sort by: Most helpful
  1. Anonymous
    2016-09-30T21:10:32+00:00

    MattSteele12 wrote:

    I am trying to run a countifs formula and am experiencing a strange error. Here is my formula:

    =COUNTIFS(F1:F326569, "*5 Mealplan*", AX2:AX326569, "*PH Dinner*")

    I agree that the error message is strange for the error that I see.

    Both (all) ranges must be the same size and shape.  Both ranges end with row 326569.  But one range starts with row 1 (F1); the other with row 2 (AX2).

    Change F1 to F2, or change AX2 to AX1.


    [EDIT] I get a #VALUE error (reasonable!) when I have the simple error that I identified.  So perhaps you have something else wrong, which is not apparent to me.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-10-04T05:41:47+00:00

    Hi Matt,

    Do you need further assistance on this?

    Thanks,

    Mike

    Was this answer helpful?

    0 comments No comments