Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have data in sheet1 in col A, B and C and I need to sort the data when the workbook is not active(either addIn) or from other sheet(Sheet2). The following is the code i am using but its gives me error. Set rng = ThisWorkbook.Worksheets("Sheet1").Range("A25:C44") 'If sortcriteria is None then dont do anything 'If sortcriteria is Ascending then do Ascending sorting If sortCriteria = "Ascending" Then rng.sort Key1:=Range(rng.Columns(ColNo).Address), _ Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom: Exit Sub Can somebody suggest me a way out? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
how do copy "sheet1!A1+1 in sheet2 to sheet 3 and get "sheet2!A1+ | Excel Discussion (Misc queries) | |||
[=Sheet1!A1] - if i use Column A1 ('Sheet1') / A2 ('Sheet2') | Excel Worksheet Functions | |||
How to reference C5, D5, E5 from sheet2 in A1, A2, A3 of sheet1? | Excel Worksheet Functions | |||
VALUES CORRESPONDING FROM SHEET1 / SHEET2 | Excel Programming |