Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Quick question. I just realized that during my sort it goes from item
1 to item 10 then item 2 because its looking at just the digits not the number as a whole. So is there a way to make it look at the whole number my code is With Sheets("Sheet1").Range("A1:E230") .sort key1:=Sheets("Sheet1").Range("A1"), Order1:=xlAscending End With very simple! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, your data isn't numeric--it's text.
If you format the cells as general and reenter the values (or convert them to numbers some other way), you'll be able to sort ok. One way to convert those text numbers to number numbers: select an empty cell edit|Copy select A1:A230 (your range to fix) edit|paste special|click Add wrote: Quick question. I just realized that during my sort it goes from item 1 to item 10 then item 2 because its looking at just the digits not the number as a whole. So is there a way to make it look at the whole number my code is With Sheets("Sheet1").Range("A1:E230") .sort key1:=Sheets("Sheet1").Range("A1"), Order1:=xlAscending End With very simple! -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ps.
Just to verify... Try this in a couple of empty cells: =count(A1:A230) =counta(a1:a230) The first counts numbers in that range. The second counts all the non-empty cells (text or numbers). Dave Peterson wrote: Actually, your data isn't numeric--it's text. If you format the cells as general and reenter the values (or convert them to numbers some other way), you'll be able to sort ok. One way to convert those text numbers to number numbers: select an empty cell edit|Copy select A1:A230 (your range to fix) edit|paste special|click Add wrote: Quick question. I just realized that during my sort it goes from item 1 to item 10 then item 2 because its looking at just the digits not the number as a whole. So is there a way to make it look at the whole number my code is With Sheets("Sheet1").Range("A1:E230") .sort key1:=Sheets("Sheet1").Range("A1"), Order1:=xlAscending End With very simple! -- Dave Peterson -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 5, 4:05 pm, Dave Peterson wrote:
Ps. Just to verify... Try this in a couple of empty cells: =count(A1:A230) =counta(a1:a230) The first counts numbers in that range. The second counts all the non-empty cells (text or numbers). Dave Peterson wrote: Actually, your data isn't numeric--it's text. If you format the cells as general and reenter the values (or convert them to numbers some other way), you'll be able to sort ok. One way to convert those text numbers to number numbers: select an empty cell edit|Copy select A1:A230 (your range to fix) edit|paste special|click Add wrote: Quick question. I just realized that during my sort it goes from item 1 to item 10 then item 2 because its looking at just the digits not the number as a whole. So is there a way to make it look at the whole number my code is With Sheets("Sheet1").Range("A1:E230") .sort key1:=Sheets("Sheet1").Range("A1"), Order1:=xlAscending End With very simple! -- Dave Peterson -- Dave Peterson- Hide quoted text - - Show quoted text - I am using both text and numbers and I need both. I tried doing the pastespecial add function in the macros but it gave me an error. Is there any other way to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort question?? | Excel Discussion (Misc queries) | |||
Sort question | Excel Programming | |||
sort question | Excel Worksheet Functions | |||
Sort Question | Excel Programming | |||
sort question | Excel Discussion (Misc queries) |