Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
How can i, in vba, sort colum F and G on the value in column F. Thanks, Pierre -- Message posted via http://www.officekb.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("F:G").sort Key1:=Range("F1"), Header:=xlYes
-- Regards, Tom Ogilvy "Pierre via OfficeKB.com" <u13950@uwe wrote in message news:58bbf03d73d85@uwe... Hi, How can i, in vba, sort colum F and G on the value in column F. Thanks, Pierre -- Message posted via http://www.officekb.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
As allways : THANKS !!! but i think i put my question a little wrong... My data does not start in F1 but in F4.... and the length of the list is dependent on the users input (can be 20 items, can be 50 items). How can i adapt your code ? Pierre P.S. My data does not start in F1 but in F4.... and the length of the list is dependent on the users input (can be 20 items, can be 50 items). Tom Ogilvy wrote: Range("F:G").sort Key1:=Range("F1"), Header:=xlYes Hi, How can i, in vba, sort colum F and G on the value in column F. Thanks, Pierre -- Message posted via http://www.officekb.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe...
with activesheet with .range("f4:G" & .cells(.rows.count,"F").end(xlup).row) .sort key1:=.columns(1), header:=xlyes end with end with The last cell in the F:G range is based on the bottom most cell in column F. "Pierre via OfficeKB.com" wrote: Hi Tom, As allways : THANKS !!! but i think i put my question a little wrong... My data does not start in F1 but in F4.... and the length of the list is dependent on the users input (can be 20 items, can be 50 items). How can i adapt your code ? Pierre P.S. My data does not start in F1 but in F4.... and the length of the list is dependent on the users input (can be 20 items, can be 50 items). Tom Ogilvy wrote: Range("F:G").sort Key1:=Range("F1"), Header:=xlYes Hi, How can i, in vba, sort colum F and G on the value in column F. Thanks, Pierre -- Message posted via http://www.officekb.com -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
set rng = Range(Range("F4"),Range("F4").End(xldown)).Resize( ,2) rng.Sort Key1:=Range("F4"),Header:=xlGuess -- Regards, Tom Ogilvy "Pierre via OfficeKB.com" <u13950@uwe wrote in message news:58bc54b178429@uwe... Hi Tom, As allways : THANKS !!! but i think i put my question a little wrong... My data does not start in F1 but in F4.... and the length of the list is dependent on the users input (can be 20 items, can be 50 items). How can i adapt your code ? Pierre P.S. My data does not start in F1 but in F4.... and the length of the list is dependent on the users input (can be 20 items, can be 50 items). Tom Ogilvy wrote: Range("F:G").sort Key1:=Range("F1"), Header:=xlYes Hi, How can i, in vba, sort colum F and G on the value in column F. Thanks, Pierre -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sorting ranges of various column lengths, lookup values in columns | Excel Worksheet Functions | |||
Sorting 5 columns of data based on column A | Excel Discussion (Misc queries) | |||
Sorting Data into columns without replacing the columns with data | New Users to Excel | |||
Sorting Data From One Column into Multiple Columns | Excel Worksheet Functions | |||
In Excel, sorting columns automatically by clicking column title | Excel Discussion (Misc queries) |