Count based on two columns, skipping blanks

PrivateVenue

New Member
Joined
Apr 5, 2016
Messages
17
Alright, so what I've been trying to figure out for an embarrassingly long amount of time is how to count different values based on two columns, skipping blanks.

I've tried a variety of COUNTIF/S and SUMPRODUCT formulas. This is the closest I've come, but it doesn't take into account what is in column L, so it's continuing the count instead of starting over each month. The formula is column P is =IF($O3="","",SUMPRODUCT(--(O$3:O3<>"")))

[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]P[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11/16[/TD]
[TD]Riverfront[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]11/16[/TD]
[TD]616 Lofts[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11/16[/TD]
[TD]Alta[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]11/16[/TD]
[TD]Rocky Vista[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]12/16[/TD]
[TD]616 Lofts[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]12/16[/TD]
[TD]Alta[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]12/16[/TD]
[TD]Rocky Vista[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]1/17[/TD]
[TD]Hyatt[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]1/17[/TD]
[TD]RC Condos[/TD]
[TD]9[/TD]
[/TR]
</tbody>[/TABLE]

This is how I would like it to look, the count starts over with each month and skips the blanks.

[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]P[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11/16[/TD]
[TD]Riverfront[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]11/16[/TD]
[TD]616 Lofts[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11/16[/TD]
[TD]Alta[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]11/16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]11/16[/TD]
[TD]Rocky Vista[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]12/16[/TD]
[TD]616 Lofts[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]12/16[/TD]
[TD]Alta[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]12/16[/TD]
[TD]Rocky Vista[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]1/17[/TD]
[TD]Hyatt[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]1/17[/TD]
[TD]RC Condos[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]

Any help is greatly appreciated!
 
Last edited:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Are your entries in column L text or dates?
 
Upvote 0
Enter this formula in P3 and copy down for all rows:
Code:
=IF(O3="","",COUNTIFS(L$3:L3,L3,O$3:O3,"<>" & ""))
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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