#1   Report Post  
Ivor Williams
 
Posts: n/a
Default Copy down


I've imported a spreadsheet, some sample data is below. I would like to
create a macro or some code to:
1. If there is a value in column F, delete the row.
2. If a 5 digit string is followed by a 12 character alphanumeric
string, replace the 12 character string with the 5 digit string ahead of it
3. If there is no value in column B, delete the row.

In the first sample below,
1. Row 3 would be deleted, all rows below it would move up.
2. The value in what is now A3 (01559) would be copied down until
the next 5 digit only string is encountered in column A. The next 5 digit
string would be left unchanged, but would be copied down until the next. So
on until the end of the sheet.
3. Row A3 and all like it would be deleted.

This should leave a sheet that looks like the second sample.
Please help if you can.

Ivor



A B C D
E F G H I
00020 Sof 992 24 Jan 2005 No ETA Not Received 2/501
Vanc Wh No Type OK
00020 Sof 992 24 Jan 2005 No ETA Not Received 1/501 Vanc Wh No Type
OK
Total 169
01559
VAAB20050105 Sof 951 05 Jan 2005 No ETA Not Received 2/75 Vanc Wh No
Type OK
VAAB20050105 Sof 951 05 Jan 2005 No ETA Not Received 1/75 Vanc Wh No
Type OK
VAAB20050105 Sof 951 05 Jan 2005 No ETA Not Received 1/75 Vanc Wh No
Type OK


A B C D E
F G H I
I
00020 Sof 992 24 Jan 2005 No ETA Not Received 2/501 Vanc Wh No Type
OK
00020 Sof 992 24 Jan 2005 No ETA Not Received 1/501 Vanc Wh No Type
OK
01559 Sof 951 05 Jan 2005 No ETA Not Received 2/75 Vanc Wh No Type OK
01559 Sof 951 05 Jan 2005 No ETA Not Received 1/75 Vanc Wh No Type OK
01559 Sof 951 05 Jan 2005 No ETA Not Received 1/75 Vanc Wh No Type OK



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
reminder notifications in a column L Mieth Excel Discussion (Misc queries) 6 June 10th 05 11:00 AM
Excel won't copy outside sheet Jack Sons Excel Discussion (Misc queries) 6 May 17th 05 10:05 PM
Copy sheet to new workbook Tim Excel Discussion (Misc queries) 5 April 28th 05 02:00 PM
Copy Function Genie Bohn Excel Discussion (Misc queries) 0 March 23rd 05 12:28 AM
Copy and pasting graphs to PowerPoint JZip Excel Discussion (Misc queries) 0 January 6th 05 08:29 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"