Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cut and Paste Macro

Hi Everyone,

I have a worksheet where multiple tables are stacked vertically (so,
the worksheet has ~ 500,000 rows). Approximately every 8,000 rows a
new table will begin and the cell in column A will be "cert". (So
cell A1 is "cert", cell A8316 is "cert", cell A16,631 is "cert", etc.)

Each table has between 4 and 25 columns.

I'm hoping to write a macro that will cut the rows beginning with
"cert" and move them to the top of the worksheet and paste them in the
first blank column in row 1. (Basically to correct the problem of
having multiple tables stacked vertically by laying them out
horizontally, then I can delete the duplicate "cert" columns
manually).

Please let me know if you have any suggestions.

Thanks for you help!
Emily
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Cut and Paste Macro

assuming all the columns have the same headings and this is in row 1
already?
last rw = Range("A1000000").End(xlup).Row

for rw = rw to 2 step -1
IF Cells(rw,1)="cert" then
rows(rw).Delete
End If
Next


wrote in message
...
Hi Everyone,

I have a worksheet where multiple tables are stacked vertically (so,
the worksheet has ~ 500,000 rows). Approximately every 8,000 rows a
new table will begin and the cell in column A will be "cert". (So
cell A1 is "cert", cell A8316 is "cert", cell A16,631 is "cert", etc.)

Each table has between 4 and 25 columns.

I'm hoping to write a macro that will cut the rows beginning with
"cert" and move them to the top of the worksheet and paste them in the
first blank column in row 1. (Basically to correct the problem of
having multiple tables stacked vertically by laying them out
horizontally, then I can delete the duplicate "cert" columns
manually).

Please let me know if you have any suggestions.

Thanks for you help!
Emily


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
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro Steven Excel Programming 1 October 17th 05 08:56 AM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM
Cut and Paste using Macro gives paste special method error Lourens Pentz Excel Programming 3 November 21st 04 10:42 PM
Macro to Paste to specific line, and continue to Paste each time on next row not over tomkarakowski[_2_] Excel Programming 1 May 28th 04 06:50 PM
Macro to Copy/Paste then Paste to Next Line tomkarakowski Excel Programming 1 May 28th 04 01:19 AM


All times are GMT +1. The time now is 05:18 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"