Counting with multiple criteria

ps50150

New Member
Joined
Jan 22, 2018
Messages
6
Hi,


Column AT has dates in date format (1-Jun-2018, 2-Jun-2018, etc until end 30-Jun-2018)
Column AU has dates (date format) but display is weekday format (ie Mon, Tues, Wed..)
Column AV has numbers on certain days for example 1 Jun 2018 could have 3, and 17 Jun 2018 could have another 3 etc, some dates could be blank...

I need a formula that counts how many Mondays have a value in column AV,
Then how many Tuesdays have a value in column AV

=SUMPRODUCT(--(WEEKDAY(AX$7:AX$37)=AZ43),--(AZ7:AZ37>0))

AZ43 = 1 (eg Monday)

Don't know why its not working any help is very much appreciated!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi,


Column AT has dates in date format (1-Jun-2018, 2-Jun-2018, etc until end 30-Jun-2018)
Column AU has dates (date format) but display is weekday format (ie Mon, Tues, Wed..)
Column AV has numbers on certain days for example 1 Jun 2018 could have 3, and 17 Jun 2018 could have another 3 etc, some dates could be blank...

I need a formula that counts how many Mondays have a value in column AV,
Then how many Tuesdays have a value in column AV

=SUMPRODUCT(--(WEEKDAY(AX$7:AX$37)=AZ43),--(AZ7:AZ37>0))

AZ43 = 1 (eg Monday)

Don't know why its not working any help is very much appreciated!

Hi,

Your description says you want the COUNT, not SUM of the values in Column AV, 2 ways:
AX7 formula does not need a cell reference for WEEKDAY,
AX8 formula uses a cell reference for WEEKDAY,

Both formulae copied across, might need tweaking depending on your layout.


Book1
ATAUAVAWAXAYAZBABBBCBD
6MonTueWedThuFriSatSun
71-Jun-18Fri31000201
82-Jun-18Sat1000201
93-Jun-18Sun
104-Jun-18Mon
115-Jun-18Tue
126-Jun-18Wed
137-Jun-18Thu
148-Jun-18Fri
159-Jun-18Sat
1610-Jun-18Sun
1711-Jun-18Mon
1812-Jun-18Tue
1913-Jun-18Wed
2014-Jun-18Thu
2115-Jun-18Fri3
2216-Jun-18Sat
2317-Jun-18Sun3
2418-Jun-18Mon
2519-Jun-18Tue
2620-Jun-18Wed
2721-Jun-18Thu
2822-Jun-18Fri
2923-Jun-18Sat
3024-Jun-18Sun
3125-Jun-18Mon4
3226-Jun-18Tue
3327-Jun-18Wed
3428-Jun-18Thu
3529-Jun-18Fri
3630-Jun-18Sat
Sheet20
Cell Formulas
RangeFormula
AX7=SUMPRODUCT(--(WEEKDAY($AU7:$AU36,2)=COLUMN(A1)*($AV7:$AV36<>"")))
AX8=SUMPRODUCT(--(WEEKDAY($AU7:$AU36)=WEEKDAY(AX6)*($AV7:$AV36<>"")))
 
Upvote 0
Ahhh I see...Cell AX6 needs to be a normal date format as well...or the number 2 for Monday etc

Once I have changed that it seems to work! Thanks so much!
 
Upvote 0
You're welcome, welcome to the forum, glad you got it working.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top