![]() |
#7
|
|||
|
|||
![]()
Solution was offed by
carlmon ![]() Code:
Sub carlmon() Dim D As Range Dim E As Range Dim F As Range Dim G As Range For Each c In Sheet1.Range("B6:B1000") Set D = Sheet1.Range("D" & Rows.Count).End(xlUp) Set E = Sheet1.Range("E" & Rows.Count).End(xlUp) Set F = Sheet1.Range("F" & Rows.Count).End(xlUp) Set G = Sheet1.Range("G" & Rows.Count).End(xlUp) Select Case Left(c, 2) Case Is = "AB" Set D = D.Offset(1) D = c.Value Case Is = "BC" Set E = E.Offset(1) E = c.Value Case Is = "CD" Set F = F.Offset(1) F = c.Value Case Is = "DE" Set G = G.Offset(1) G = c.Value End Select Next c End Sub Last edited by macropod; 05-02-2022 at 04:02 PM. Reason: Corrected code formatting, added code tags & link. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom sort macro | ewso | Excel Programming | 7 | 10-10-2017 12:08 PM |
![]() |
SerenityNetworks | Excel Programming | 4 | 09-02-2016 06:20 AM |
![]() |
FromF | Excel | 2 | 09-09-2014 02:30 AM |
Looking for Help to Create a Macro (Sort) | rsrasc | Word VBA | 5 | 04-16-2014 03:25 AM |
Sort table using macro | saslotteroy | Word VBA | 2 | 09-15-2011 02:41 PM |