Quick count of non-blank cells in a workbook?

Celly

Board Regular
Joined
Jan 29, 2015
Messages
84
Office Version
  1. 2016
Platform
  1. Windows
I am looking for a quick and dirty way to count the total non-blank cells as a metric in order to do rough comparisons of complexity between two or more workbooks.

If this is possible to do without VBA, it would be helpful.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
If this is possible to do without VBA, it would be helpful.
Where would this calculation be placed?
It would have to be on a different sheet, or else you would have a circular reference (as the range that the formula would look at would have to include the cell that this formula is in!).

If you wanted to count the populated cells on Sheet1, then you could place this formula somewhere on sheet 2:
Excel Formula:
=COUNTA(Sheet1!1:1048576)
 
Upvote 0
Solution
Where would this calculation be placed?
It would have to be on a different sheet, or else you would have a circular reference (as the range that the formula would look at would have to include the cell that this formula is in!).

If you wanted to count the populated cells on Sheet1, then you could place this formula somewhere on sheet 2:
Excel Formula:
=COUNTA(Sheet1!1:1048576)

Thanks, I can work with that!

So my project has 95,000 non-blank cells (the vast majority are formulas). A lot of work went into it.
 
Upvote 0
You are welcome.
So my project has 95,000 non-blank cells (the vast majority are formulas). A lot of work went into it.
Wow, sounds like quite the behemoth! How is the performance? Is it pretty slow?
 
Upvote 0
You are welcome.

Wow, sounds like quite the behemoth! How is the performance? Is it pretty slow?

Yes it is. The performance is pretty good actually. There is some supporting VBA which does a binary search of the entire simulation, and it can take up to 10 seconds to "solve" it. But making updates to an individual simulation parameter is pretty snappy.

I'd also love to count the number of floating point operations which go into a full solve of the simulation. I haven't figured that one out yet.
 
Upvote 0
I'd also love to count the number of floating point operations which go into a full solve of the simulation. I haven't figured that one out yet.
Not sure how to do that (or even if it is possible), but feel free to post a new question about it.
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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