Count every 15th non-empty cell in row

Whitestar127

New Member
Joined
Feb 21, 2024
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hi, consider this sheet (row 1 is shown in the image):

zOIUSV5.png


I'm looking for a function to count the number of names in row 1 from BE1 all the way to UU1. Only as far as DL1 is shown in the image above because of lack of space.
It should count every 15th cell as that is the distance (in number of columns) between each name.

So basically count every 15th non-empty cell starting from BE1. There are currently only 3 names: Alex, Alfred, and Anders. So the function should return 3, since cells CX1 to UU1 currently contain no names.

I'm guessing the function should contain COUNTIF, MOD and COLUMN or something similar, but I can't get my head around how to do it exactly.

Can anyone help?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi, here's one option you could try:

Excel Formula:
=COUNTA(LET(c,INDEX(BE1:UU1,SEQUENCE(35,,1,15)),FILTER(c,c<>"")))
 
Upvote 0
Color me impressed! That worked perfectly!! 🤯 Thanks a lot! 😃

Just curious, this will work on all 365 versions I assume. But will it work on older versions of Excel?

Also, if you have time could you explain that Sequence function? For instance, where does 35 come from?
EDIT: Oh never mind. Number of rows to return.
 
Upvote 0
Btw, there is one small peculiarity: It returns 1 even if there are 0 names present.

0 names --> 1
1 name --> 1

I tried to change the Start parameter to 0 but that didn't work.
 
Upvote 0
Ah, ok - here's an alternative you could try:

Excel Formula:
=COUNT(1/(INDEX(BE1:UU1,SEQUENCE(35,,1,15))<>""))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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