Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Selecting cells

I have a block of data cells from AS3 to AS14 which I
sort. As a result of the sort I am left with some rows of
data and some rows of blank cells. After the sort, the
blank cells appear first and then the cells with data. I
wish to select only the data cells which I then paste
elsewhere. The data cells obviously appear at the bottom
of my cell range. Could any one assist with a macro to
only select the data cells.
Thanks,
Rick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Selecting cells

Rick

When I sort, the blanks appear at the bottom. How are you sorting to get
them at the top?

To get the data cells, you might try this

Dim Rng As Range

Set Rng = Range("AS3:AS13")

Range(Rng.Cells(1).End(xlDown), _
Rng.Cells(1).End(xlDown).End(xlDown)).Select

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Rick" wrote in message
...
I have a block of data cells from AS3 to AS14 which I
sort. As a result of the sort I am left with some rows of
data and some rows of blank cells. After the sort, the
blank cells appear first and then the cells with data. I
wish to select only the data cells which I then paste
elsewhere. The data cells obviously appear at the bottom
of my cell range. Could any one assist with a macro to
only select the data cells.
Thanks,
Rick



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selecting cells

You might try using the "Auto Filter" first to filter out
the blank rows, paste it then sort from there. That may
be difficult to do if one of the columns does not contain
a common property in the 14 rows of data you are going to
sort.

-----Original Message-----
I have a block of data cells from AS3 to AS14 which I
sort. As a result of the sort I am left with some rows of
data and some rows of blank cells. After the sort, the
blank cells appear first and then the cells with data. I
wish to select only the data cells which I then paste
elsewhere. The data cells obviously appear at the bottom
of my cell range. Could any one assist with a macro to
only select the data cells.
Thanks,
Rick

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting multiple cells, I can't see the cells highlighted ET Excel Discussion (Misc queries) 1 August 1st 08 03:20 PM
How to change shade of cells when selecting multiple cells abrummet Excel Discussion (Misc queries) 3 September 6th 07 11:42 AM
selecting cells without certain value OTS Excel Worksheet Functions 3 October 11th 06 07:02 PM
By selecting cells adjacent to cells tally sheet tom Excel Worksheet Functions 2 September 20th 06 07:09 PM
selecting cells Chris Excel Discussion (Misc queries) 3 July 17th 06 09:58 PM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"