Count only rows with data, without using fixed columns

gidBeat

New Member
Joined
Mar 8, 2018
Messages
3
Hello

I want to count only the rows that contain at least one cell of data (text OR numbers), within a specified range of columns. However, I don't want to specify the range of columns using their fixed column letter names, but using the text in row 1 as the column header. (This Row 1 text is set up to be variable, so it will be different for every individual usage of the workbook that I am creating, so I can't just plug in the fixed column names)

Ideally I want a formula (rather than a Macro/VBA code) to put into a cell on another sheet and just provide a count. If I use a Macro/VBA then it will decrease the user-friendliness of the workbook I'm creating (it's a tool for my non-technical team to automate quantitative survey data analysis, with variable, but predictable, data inputs).

I have found many tips and formulas to count only the rows that contain at least one cell of data (below), but none that allow this variable column functionality
https://stackoverflow.com/questions/6867070/how-can-i-count-the-rows-with-data-in-an-excel-sheet
https://organicweb.com.au/7877/general-technology/excel-function-instructions/

<colgroup><col style="mso-width-source:userset;mso-width-alt:9910;width:203pt" width="271"> </colgroup><tbody>
</tbody>

For example, the values in row 1 will read: Q1, Q2, Q3, Q3.2, Q3.3, Q3.4, Q4, Q4.2, Q5, etc., where the number of columns with decimals allocated will vary depending on previous inputs and will occupy different columns each time the workbook is used. Now, say for example I want to look at just columns relating to Q3 (so including Q3.2, Q3.3, Q3.4, etc). I am totally lost on how to do this without using fixed column names.

Any help much appreciated!

Thanks
Matt
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi , does anyone have any ideas on the above? If it is unclear, here is a demonstration of what I'm trying to do (where '1' could be any text or number value). If something still remains unclear, please let me know what and I will explain.

Q1Q2Q3Q3.2Q3.3Q3.4Q4Q4.2Q5
111111
1111
111111
111
1111
1111
1111111
Answer for Q3: 4
(number of rows with at least one cell of data for Q3/Q3.2/Q3.3/Q3.4)
Answer for Q4: 6
(number of rows with at least one cell of data for Q4/Q4.2)
Answer for Q5: 7
(number of rows with at least one cell of data for Q5)

<colgroup><col style="width:48pt" width="64" span="10"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,568
Messages
6,120,278
Members
448,953
Latest member
Dutchie_1

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