S
Steve
Hi the following macro excerpt returns data in the following format
1-6-2-1-5 with five being the most recent number that meets the macro
criteri and five being lasty number that meets the criteria.
macro starts-------------------------------------------------------
Set c = .Find(What:=Cells(i, "q"), After:=Cells(lr - 1, "q"),
LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, _
MatchCase:=False, SearchFormat:=False)
If Not c Is Nothing Then
firstaddress = c.Address
Do
If Cells(c.Row, "h") = Cells(i, "h") And i <> c.Row Then
'ms = ms & "-" & Cells(c.Row, "AZ")
ms = Cells(c.Row, "AZ") & "-" & ms
'Cells(i, "X") = Right(ms, Len(ms) - 1)
Cells(i, "x") = Left(ms, Len(ms) - 1)
End If
macro ends---------------------------------------------------------
Could anyone please tell me how to reverse the output so that it reads
as follows:
5-1-2-6-1
Thanks in advance
Steve
1-6-2-1-5 with five being the most recent number that meets the macro
criteri and five being lasty number that meets the criteria.
macro starts-------------------------------------------------------
Set c = .Find(What:=Cells(i, "q"), After:=Cells(lr - 1, "q"),
LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, _
MatchCase:=False, SearchFormat:=False)
If Not c Is Nothing Then
firstaddress = c.Address
Do
If Cells(c.Row, "h") = Cells(i, "h") And i <> c.Row Then
'ms = ms & "-" & Cells(c.Row, "AZ")
ms = Cells(c.Row, "AZ") & "-" & ms
'Cells(i, "X") = Right(ms, Len(ms) - 1)
Cells(i, "x") = Left(ms, Len(ms) - 1)
End If
macro ends---------------------------------------------------------
Could anyone please tell me how to reverse the output so that it reads
as follows:
5-1-2-6-1
Thanks in advance
Steve