Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?




Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

when you sort it, the blanks will automatically go to the bottom of
whatever column it is sorting from.
do you want to sort it programmatically, or just in excel?
if in excel, highlight the range & choose "Data" "Sort".
susan



On Mar 27, 10:28 am, "Dustin" wrote:
I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

& if you want to do it automatically, then turn on the macro recorder,
sort the data, stop the macro recorder, and see how it did it.
susan

On Mar 27, 10:28 am, "Dustin" wrote:
I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

On Mar 27, 9:39 am, "Susan" wrote:
& if you want to do it automatically, then turn on the macro recorder,
sort the data, stop the macro recorder, and see how it did it.
susan

On Mar 27, 10:28 am, "Dustin" wrote:

I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?


Thanks


Ok Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

On Mar 27, 9:58 am, "Dustin" wrote:
On Mar 27, 9:39 am, "Susan" wrote:

& if you want to do it automatically, then turn on the macro recorder,
sort the data, stop the macro recorder, and see how it did it.
susan


On Mar 27, 10:28 am, "Dustin" wrote:


I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?


Thanks


Ok Thanks


Can you give me an example to use the sort command after the following
code

'Collects Owners into range
Dim Owners As Range
Dim OwnerCell As Range

Set Owners = exApp.Range("B:B").SpecialCells(xlCellTypeConstant s)
For Each OwnerCell In Owners
Next OwnerCell

Owners.Sort (What do I do from here?)


Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

here's a link to a thread that explains "sort" pretty well.........
http://groups.google.com/group/micro...3e326ab ad23e

Selection.Sort Key1:=Range("B1"), Order1:=xlAscending,
header:=xlGuess,
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortNormal

these are all the parameters for "sort".
you don't need the "for each - next" construct because
you're going to select (or indicate) the whole range
and then sort THAT. you can't sort individual cells because
you have nothing to sort them against.

Set Owners = exApp.Range("B:B").SpecialCells(xlCellTypeConstant s)
owners.sort blah blah blah

hope this helps
susan



On Mar 27, 11:08 am, "Dustin" wrote:
On Mar 27, 9:58 am, "Dustin" wrote:

On Mar 27, 9:39 am, "Susan" wrote:


& if you want to do it automatically, then turn on the macro recorder,
sort the data, stop the macro recorder, and see how it did it.
susan


On Mar 27, 10:28 am, "Dustin" wrote:


I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?


Thanks


Ok Thanks


Can you give me an example to use the sort command after the following
code

'Collects Owners into range
Dim Owners As Range
Dim OwnerCell As Range

Set Owners = exApp.Range("B:B").SpecialCells(xlCellTypeConstant s)
For Each OwnerCell In Owners
Next OwnerCell

Owners.Sort (What do I do from here?)

Thanks



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Manipulating Ranges Alphabetically, and Deleting Blank Entries

If you sort it in alphabetical order, don't all the blanks sort to the bottom?

Seems like that would be equivalent to deleting them

Or you can do

columns(1).SpecialCells(xlBlanks).EntireRow.Delet

of course they may not really be blanks, but are cells that look blank.
that would be different.

--
Regards,
Tom Ogilvy


"Dustin" wrote:

I was wondering if it is possible to sort a range in
alphabetical order, and delete any blank entries?




Thanks


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
Manipulating ranges in a different file Lenchik Links and Linking in Excel 2 October 18th 08 04:01 AM
Manipulating ranges in a different excel file Lenchik Excel Worksheet Functions 3 October 13th 08 03:51 AM
any way to alphabetically sort text entries in EXCEL? JTMVOL Excel Discussion (Misc queries) 1 November 27th 06 08:19 PM
deleting blank entries mikeyVo Excel Discussion (Misc queries) 1 August 4th 06 06:30 AM
How do I arrange entries in a column alphabetically ferrymaster77 Excel Discussion (Misc queries) 1 January 21st 05 11:58 AM


All times are GMT +1. The time now is 02:55 PM.

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"