Count number of rows that contain data (rows will be dynamic)

danniaus

New Member
Joined
Jun 2, 2016
Messages
20
Hello

If I have a set of data that will have an unknown number of rows, how can I calculate the number of rows with data in them if the sheet will change each time

Example below, I only wish to count the rows with actual data not the blanks and because the range will change I can use a specific range

[TABLE="class: grid, width: 742"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]NMI/MIRN Quote*[/TD]
[TD]Current Retailer[/TD]
[TD]DMA provider[/TD]
[TD]Annual Peak KWh*[/TD]
[TD]Annual Shoulder KWh*[/TD]
[TD]Annual Off Peak KWh*[/TD]
[/TR]
[TR]
[TD="align: right"]6203724417[/TD]
[TD]Origin Energy[/TD]
[TD]Plus ES[/TD]
[TD="align: right"]756,063[/TD]
[TD][/TD]
[TD="align: right"]228278.09[/TD]
[/TR]
[TR]
[TD="align: right"]6203724417[/TD]
[TD]Origin Energy[/TD]
[TD]Plus ES[/TD]
[TD="align: right"]756,063[/TD]
[TD][/TD]
[TD="align: right"]228278.09[/TD]
[/TR]
[TR]
[TD="align: right"]6203724417[/TD]
[TD]Origin Energy[/TD]
[TD]Plus ES[/TD]
[TD="align: right"]756,063[/TD]
[TD][/TD]
[TD="align: right"]228278.09[/TD]
[/TR]
[TR]
[TD="align: right"]6203724417[/TD]
[TD]Origin Energy[/TD]
[TD]Plus ES[/TD]
[TD="align: right"]756,063[/TD]
[TD][/TD]
[TD="align: right"]228278.09[/TD]
[/TR]
[TR]
[TD="align: right"]6203724417[/TD]
[TD]Origin Energy[/TD]
[TD]Plus ES[/TD]
[TD="align: right"]756,063[/TD]
[TD][/TD]
[TD="align: right"]228278.09[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Assuming you do not want to count the header, simply pick a column whose data is numeric (like Column A) and using the COUNT function on it...

=COUNT(A:A)
 
Upvote 0
Ah it wasn't working because column A isnt always numerical, thankyou I am now using column H and it works. Thankyou :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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