Long N
Long N

Reputation: 21

Not sure how to do this countifs function correctly

I have this table below

Order Info

What I want is able to pivot for number of items(column) ordered by days (row). I'm not sure how to do it smartly. So I thought of a way which is to create a table below

enter image description here

However, when I tried writing a countifs, it gives me error. What I tried for each row was: =countifs(range of item 1 to item 3, that item, range of the whole Order Date column, that date). But it throws me an #VALUE error. More details below

enter image description here

So yeah, I'm stuck. Can someone please help? I'm using Excel 2019 by the way

Upvotes: 0

Views: 47

Answers (1)

basic
basic

Reputation: 11968

For COUNTIFS function each additional range must have the same number of rows and columns as first range.

But I can suggest the SUMPRODUCT function:

=SUMPRODUCT(([@Item]=Table1[[Item 1]:[Item 3]])*([@Date]=Table1[Order Date]))

enter image description here

Upvotes: 2

Related Questions