delete blanks

  • Thread starter Thread starter dennis
  • Start date Start date
D

dennis

Hello

I have a series of ranges, eg a1:a10
This range contains words in some cells and numbers in
others.
I successfully replace all certain words with "" and sort
the range using A1 as the key.
However, after it's been sorted there are a number of
blank cells at the top.
Since I will be using this range to load a combobox I'd
like to shift the whole lot up and remove the blank spaces
at the top.

Any ideas?
 
If you are doing this in code, the easiest way would be to do you
replacement of the certain words with "" and then put this line in th
code before doing the sort.

Range("A1:A10").SpecialCells(xlCellTypeBlanks).EntireRow.Delete

Replacing the A1:A10 with your range. The line above essientiall
deletes the entire row of anything with a blank cell in the A1:A1
range.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top