jamiguel77
Active Member
- Joined
- Feb 14, 2006
- Messages
- 378
- Office Version
- 2016
- 2010
- 2007
- Platform
- Windows
- Web
Hi,
i need sort the range by first column of the range (note the range have a row with header)
my Problem: myRange = Range("B17:F" & lastRow)
'Range("DataRange").Sort Key1:=Range("C1"), Order1:=xlDescending
Dim myRange As Range
Range("B17").Select
Dim lastRow As Integer
lastRow = Selection.End(xlDown).Offset(0).Row
myRange = Range("B17:F" & lastRow)
myRange.Sort Key1:=Range("B17"), Order1:=xlDescending
Thanks
i need sort the range by first column of the range (note the range have a row with header)
my Problem: myRange = Range("B17:F" & lastRow)
'Range("DataRange").Sort Key1:=Range("C1"), Order1:=xlDescending
Dim myRange As Range
Range("B17").Select
Dim lastRow As Integer
lastRow = Selection.End(xlDown).Offset(0).Row
myRange = Range("B17:F" & lastRow)
myRange.Sort Key1:=Range("B17"), Order1:=xlDescending
prueva.xlsx | |||||||
---|---|---|---|---|---|---|---|
B | C | D | E | F | |||
17 | Interprete | N | Tema | Codigo | Producción - Éxitos - Al Estilo | ||
18 | Popular | 01 | Las Mañanitas | 1401 | Cántale a Mamá 1 | ||
19 | Popular | 02 | En tu día | 1401 | Cántale a Mamá 1 | ||
20 | Pedro Infante | 03 | Despierta | 1401 | Cántale a Mamá 1 | ||
21 | Vicente Fernández | 04 | Hermoso cariño | 1401 | Cántale a Mamá 1 | ||
22 | Gerardo Reyes | 05 | Paso a la reina | 1401 | Cántale a Mamá 1 | ||
23 | Vicente Fernández | 06 | Amor Eterno | 1401 | Cántale a Mamá 1 | ||
24 | Grupo Raíces | 07 | Madrecita, sólo tú (voz) | 1401 | Cántale a Mamá 1 | ||
25 | Grupo Raíces | 08 | Madrecita, sólo tú | 1401 | Cántale a Mamá 1 | ||
macro 1 |
Thanks