ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Sort changing 10 to 1 (https://www.excelbanter.com/excel-programming/420125-excel-sort-changing-10-1-a.html)

Adam_needs_help

Excel Sort changing 10 to 1
 
I am having an issue where excel is deleting the zeros at the end of a value,
so 10 is becoming 1. This was first seen in a macro where I run sort, but
happens if I just use the sort manually as well. I have gotten it to not
repeat manually, but it seems to always be doing it in the macro. Has anyone
ever seen this?

Here is the code used for sorting.

ActiveSheet.UsedRange.Sort Key1:=Cells(2, ccData1), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=ccData1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

This is quite frustrating, so any help would be great. Thanks.

Adam_needs_help

Excel Sort changing 10 to 1
 

As an add on, it does not change every 10 to a 1, but most of them it does.

I am totally confused.

"Adam_needs_help" wrote:

I am having an issue where excel is deleting the zeros at the end of a value,
so 10 is becoming 1. This was first seen in a macro where I run sort, but
happens if I just use the sort manually as well. I have gotten it to not
repeat manually, but it seems to always be doing it in the macro. Has anyone
ever seen this?

Here is the code used for sorting.

ActiveSheet.UsedRange.Sort Key1:=Cells(2, ccData1), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=ccData1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

This is quite frustrating, so any help would be great. Thanks.


Adam_needs_help

Excel Sort changing 10 to 1
 
OK, I may be an idiot, I think I have been working on this macro for too
long. I think the error was in my data set, I was seeing things now I did
not see before, that made it look like 10 was going to 1, but there were ones
in the data I never saw before. (Its a large data set.

Sorry about that.

Is there a way to delete these posts?

"Adam_needs_help" wrote:


As an add on, it does not change every 10 to a 1, but most of them it does.

I am totally confused.

"Adam_needs_help" wrote:

I am having an issue where excel is deleting the zeros at the end of a value,
so 10 is becoming 1. This was first seen in a macro where I run sort, but
happens if I just use the sort manually as well. I have gotten it to not
repeat manually, but it seems to always be doing it in the macro. Has anyone
ever seen this?

Here is the code used for sorting.

ActiveSheet.UsedRange.Sort Key1:=Cells(2, ccData1), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=ccData1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

This is quite frustrating, so any help would be great. Thanks.


Sandy Mann

Excel Sort changing 10 to 1
 
"Adam_needs_help" wrote in message
...

As an add on, it does not change every 10 to a 1, but most of them it
does.


Is it possible that there is omething in the cells that change? What
happens if you manually enter a 10 in a cell that was changed to 1?

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Adam_needs_help" wrote in message
...

As an add on, it does not change every 10 to a 1, but most of them it
does.

I am totally confused.

"Adam_needs_help" wrote:

I am having an issue where excel is deleting the zeros at the end of a
value,
so 10 is becoming 1. This was first seen in a macro where I run sort,
but
happens if I just use the sort manually as well. I have gotten it to not
repeat manually, but it seems to always be doing it in the macro. Has
anyone
ever seen this?

Here is the code used for sorting.

ActiveSheet.UsedRange.Sort Key1:=Cells(2, ccData1), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=ccData1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

This is quite frustrating, so any help would be great. Thanks.






All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com