Copy cells up - based on ID??

H

harteorama

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
 
D

Don Guillett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top