ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I have trouble in the hidden sheet range (https://www.excelbanter.com/excel-programming/302117-i-have-trouble-hidden-sheet-range.html)

kvenku[_22_]

I have trouble in the hidden sheet range
 
Hi,
I need to sort a bunch of values to ascending order. So i used t
store the values in the HiddenSheet (Sheet1).

I am using this code

Sheet1.Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

The sorting is not working in the hidden sheet why?

But the sorting is working if in current sheet

Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Is there any other way to acheived this. PLease do reply me soon

Thanks

Venkatesh

--
Message posted from http://www.ExcelForum.com


Don Guillett[_4_]

I have trouble in the hidden sheet range
 
Hidden doesn't matter
You cannot select a range this way. Use

Sheets("sheet1").select
Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

OR to sort it without going to the sheet at all.

Sheets("sheet1").Range("A13:A35").Sort Key1:=sheets("sheet1").Range("A13"),
_
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

--
Don Guillett
SalesAid Software

"kvenku " wrote in message
...
Hi,
I need to sort a bunch of values to ascending order. So i used to
store the values in the HiddenSheet (Sheet1).

I am using this code

Sheet1.Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

The sorting is not working in the hidden sheet why?

But the sorting is working if in current sheet

Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Is there any other way to acheived this. PLease do reply me soon

Thanks

Venkatesh.


---
Message posted from
http://www.ExcelForum.com/




Tom Ogilvy

I have trouble in the hidden sheet range
 
Hidden doesn't allow selecting, so use Don's second approach.

--
Regards,
Tom Ogilvy

"Don Guillett" wrote in message
...
Hidden doesn't matter
You cannot select a range this way. Use

Sheets("sheet1").select
Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

OR to sort it without going to the sheet at all.

Sheets("sheet1").Range("A13:A35").Sort

Key1:=sheets("sheet1").Range("A13"),
_
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

--
Don Guillett
SalesAid Software

"kvenku " wrote in message
...
Hi,
I need to sort a bunch of values to ascending order. So i used to
store the values in the HiddenSheet (Sheet1).

I am using this code

Sheet1.Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

The sorting is not working in the hidden sheet why?

But the sorting is working if in current sheet

Range("A13:A35").Select
Selection.Sort Key1:=Range("A13"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Is there any other way to acheived this. PLease do reply me soon

Thanks

Venkatesh.


---
Message posted from
http://www.ExcelForum.com/






kvenku[_24_]

I have trouble in the hidden sheet range
 
Great it works..

Thanks

Venkates

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 04:06 AM.

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