Count per Date and Group

mucah!t

Well-known Member
Joined
Jun 27, 2009
Messages
593
Hi all,

Is it possible to count the C's based on the criteria given in J4:L4?

Excel Workbook
ABCDEFGHIJKL
3alfaalfaalfabravobravocharliecharlieGROUPFROMTILL
41-JanDFDFDFGHGHDNDNALFA5-Jan11-Jan
52-JanDFDFDFCGHDNDN
63-JanDFDFDFRESULT =4
74-Jan
85-JanDNDNDNGHGHGHGH
96-JanDNCDNDNCGHGH
107-JanDNDNDNDNDN
118-JanCDNCDNDN
129-JanDNDNGHGH
1310-JanDNDNDNC
1411-JanGHGHCDFDF
1512-JanGHGHGHDGDGDFDF
1613-JanDGDGDFDF
1714-JanCDF
1815-JanGHGHGHDFDFDNDN
1916-JanDNDNDNDFDFDNDN
2017-JanDNDNDNDNDN
2118-JanDNDNDNDNDNCDN
2219-JanDNDNDNDNC
2320-JanDNDNDNDNDN
2421-JanDNDNGHGH
2522-JanDGDGDGGHGH
2623-JanDGDGDG
Sheet1
Excel 2003Worksheet
</TR></TBODY>
 
A stand-alone C should be 8

A stand-alone C ---> 8

Something like C2 ---> 2

Something like CD ---> 0
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
A stand-alone C should be 8

A stand-alone C ---> 8

Something like C2 ---> 2

Something like CD ---> 0

Right...

Control+shift+enter, not just enter:
Code:
=SUM(IF(($A$4:$A$26>=K4)*($A$4:$A$26<=L4)*($B$3:$H$3=J4),
    IF($B$4:$H$26="C",8,IF(ISNUMBER(SUBSTITUTE($B$4:$H$26,"C",0)+0),
      SUBSTITUTE($B$4:$H$26,"C",0)+0))))

Hope it does not exceed the limit of the nesting levels.
 
Upvote 0
One last question :oops:

Because this formula takes about 15 seconds on my computer to calculate I was thinking of putting it in a macro.

I tried to copy the formula, while recording a macro, but it gives an syntax error.

Is there a way to solve this?
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

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