He aquí una solución práctica para agrupar datos por cada cambio de valor en la celda.
Esta manera de agrupar los datos facilita leer la información y le da un toque más estético a la misma.
Después de ejecutar la macro ésta será ordenada y agrupada por proveedor.
Código VBA:
'****************************** ' ' Email: obed.cruz@exceltrabajaporti.com ' ' www.exceltrabajaporti.com ' '****************************** ' Option Explicit Sub OrdenarProveedor() Dim lngRow As Long, intRow As Long Application.ScreenUpdating = False Range("A1").CurrentRegion.Sort _ Key1:=Range("A2"), Order1:=xlAscending, Header:=xlYes lngRow = Cells(Rows.Count, 1).End(xlUp).Row For intRow = lngRow To 2 Step -1 If Cells(intRow, 1).Value <> Cells(intRow - 1, 1).Value Then _ Rows(intRow).Resize(1).Insert Next intRow Application.ScreenUpdating = True End Sub