Hi SpyderMan1234,
You could, obviously, do it in code, but with a bit of trickery you could do it without code, like this:
If your column doesn't have a header, insert a row at the top and give it a name.
Select your column.
Select
Data > Subtotals... from the Menu
You can probably accept the defaults, but make sure
Summary below data is checked, and Press
OK
You will now have a column to the left of your numbers, which will be selected.
Extend the selection to include your original column (Press
<Shift><Right Arrow>)
Select
Data > Filter > Autofilter from the Menu
From the dropdown (in the top cell of the new column) Select
(NonBlanks)
Press the
<Delete> Key
Reduce the selection down to the (now empty) column on the left (Press
<Shift><Left Arrow>)
Press
<Ctrl><-> to remove the column
If you inserted a header row, you can now delete it, and ..
..finally, Select
Data > Group and Outline > Clear Outline to remove the outline created by the subtotaling.
Enjoy,
Tony
--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.