Counting series' of text within a row

Kipper63

New Member
Joined
Mar 30, 2020
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi, I have a table with rows of data where the column headings are dates and a code 'd' is added for particular instances of activity on that date.
I have included a simple example below.
I am trying to calculate how many series of 'd' there are i.e. there are 4 unique series of 'd' code appearing. I am not interested in the number of 'd's.
I am struggling to get started, I am hoping someone can help?

A B C D E F G H I J K L M N O P Q R
Row 1 01/03/20 02/03/20 03/03/20 04/03/20 05/03/20 06/03/20 07/03/20 08/03/20 09/03/20 10/03/20 11/03/20 12/03/20 13/03/20 14/03/20 15/03/20 16/03/20 17/03/20 18/03/20
Row 2 d d d d d d d d d d
Row 3
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,498
Office Version
  1. 365
Platform
  1. Windows
Try this

=COUNTIFS(J2:JY2,"d",J$1:JY$1,"<"&TODAY(),J$1:JY$1,">="&EDATE(TODAY(),-12),K2:JZ2,"<>d",K$1:JZ$1,"<="&TODAY(),K$1:JZ$1,">"&EDATE(TODAY(),-12))
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Watch MrExcel Video

Forum statistics

Threads
1,118,809
Messages
5,574,435
Members
412,592
Latest member
moonsugar
Top