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

excel 2007 sorting leaving blanks where they are left to rigth eg
1_3_6_2_9_4_ and when your sort i want
1_2_3_4_6_9_ Line represents blank cell
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default excel 2007 sorting

Try :

i = 1
For Each c In [A1:J1]
If c.Value < "" Then
i = i + 1
Cells(i, 1) = c.Value
End If
Next c
[A1:J1].ClearContents
Range("A2", Range("A65000").End(xlUp)).Sort Key1:=Range("A2"), _
Order1:=xlAscending, Header:=xlNo, DataOption1:=xlSortNormal
i = 1
For Each c In Range("A2", Range("A65000").End(xlUp))
Cells(1, i) = c.Value
i = i + 2
Next c

Regards.
Daniel

excel 2007 sorting leaving blanks where they are left to rigth eg
1_3_6_2_9_4_ and when your sort i want
1_2_3_4_6_9_ Line represents blank cell



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
sorting in Excel 2007 problem courtenaylambert Excel Worksheet Functions 1 March 27th 10 02:03 AM
Sorting in Excel 2007 Lee New Users to Excel 2 February 20th 09 02:26 AM
Excel 2007 - Sorting Nadine Excel Worksheet Functions 0 January 19th 09 10:41 PM
Sorting in Excel 2007 Vicky Excel Discussion (Misc queries) 0 September 12th 08 01:35 PM
Sorting by color Excel 2007 CathyZ Excel Discussion (Misc queries) 1 March 28th 07 01:12 AM


All times are GMT +1. The time now is 01:02 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"