LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Deleting extra rows

Hi,

I created a macro that copies a set of data into a template.

Since the data vary in size, I had to make full column ranges so I
would always cover the cells with data. I also recorded a macro that
creates a formula based on two of those columns then copy/pastes the
formula down to the end of the spreadsheet (eg cell D65536).

After I run the macro to copy the data into the template and perform
the necessary calculations, how can I delete the remaining rows so all
I have are blank cells under the last row of data on my template.

Range("EXP_LF").Select
Selection.Copy
Sheets("Sheet8").Select
Range("N2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O2").Select
ActiveCell.FormulaR1C1 = "=RC[-3]-RC[-7]"
Range("O2").Select
Selection.Copy
Range("O3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone,
_
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

Thank you

 
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
Deleting extra rows in Excel 07 Nat Excel Discussion (Misc queries) 2 June 25th 09 09:30 PM
Deleting Extra Page gyf Excel Discussion (Misc queries) 2 April 19th 08 11:40 AM
How to compress an Excel file once deleting extra worksheets Sandals Excel Discussion (Misc queries) 0 March 2nd 06 03:28 PM
limiting or deleting extra characters in a cell dprichard Excel Discussion (Misc queries) 3 October 28th 05 09:57 PM
deleting extra spaces in a string Eric[_16_] Excel Programming 6 December 3rd 03 10:50 PM


All times are GMT +1. The time now is 08:24 PM.

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

About Us

"It's about Microsoft Excel"