PC Review


Reply
Thread Tools Rate Thread

Copy cells up - based on ID??

 
 
harteorama@googlemail.com
Guest
Posts: n/a
 
      25th Jun 2008
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
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      25th Jun 2008
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
(E-Mail Removed)
<(E-Mail Removed)> wrote in message
news:32dccddd-e654-4b87-9c7c-(E-Mail Removed)...
> 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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Cells Based on Criteria in VBA bugsyb6 Microsoft Excel Programming 3 4th Feb 2009 02:09 PM
Copy certain cells in a row to another sheet, based on certain val =?Utf-8?B?QU0=?= Microsoft Excel Worksheet Functions 2 25th Aug 2007 04:38 AM
Copy cells based on conditions to another workbook fLiPMoD£ Microsoft Excel Programming 0 2nd Aug 2007 12:31 AM
Copy certain cells in a row based on one coordinate lunker55 Microsoft Excel Misc 3 15th Nov 2004 12:29 PM
Copy Cells to new spreadsheet based on Cells(i, 4) value christian Microsoft Excel Programming 2 9th Sep 2004 04:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:19 AM.