View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Copy cells up - based on ID??

try
Sub tworowstoone()
mc = "a"
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1
If Left(Cells(i - 1, mc), 9) = Left(Cells(i, mc), 9) Then
Cells(i - 1, mc) = Cells(i - 1, mc) & _
Right(Cells(i, mc), Len(Cells(i, mc)) - 9)
Rows(i).Delete
End If
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
Hi all,

Can anybody please help, i have a spreadsheet with thousands of lines
of changes to a file (below) - i want to create 2 lines 'Changed from'
& 'Changed to'..


Change348 from FSYO00070 Tankersley
Change348 to FSYO00070 Brampton
Change349 from FSYO00070
Change349 to FSYO00070 N/A
Change350 from FSYO00070 YT51 EZS
Change350 to FSYO00070 T790 OKU
Change351 from FSYO00070
Change351 to FSYO00070 TBC
Change352 from FSYO00070 FDS40S11
Change352 to FSYO00070 FDS40S4
Change353 from FSYO00070 2013
Change353 to FSYO00070 2011
Change354 from FSYO00070 December
Change354 to FSYO00070 May
Change355 from FSYO00070
Change355 to FSYO00070 TBC
Change356 from FSYO00070
Change356 to FSYO00070 existing/hip
Change357 from FSYO00070
Change357 to FSYO00070 TBC



Any help whatsoever would be greatly appreciated...

Many many thanks

Paul