Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default copy / paste formula to last row

tnriverfish wrote:
My spreadsheet has separate formulas in AC1 through AN1 and I would
like to essencially drag that formulas down through the last row that
has any data in it.
The formulas would have to adjust like a regular drag down. Any help
would be appreciated.


How about:
Sub sub1()
Dim irow99&, icol99%
ActiveSheet.UsedRange ' to get the last row, column
irow99 = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Row
icol99 = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Column
ActiveSheet.Range("AC1:AN1").Copy _
ActiveSheet.Range("AC1:AN1").Resize(irow99)
End Sub



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
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 & paste formula Randy Excel Discussion (Misc queries) 0 May 13th 10 01:33 PM
Excel formula to copy/paste formula needed please. colwyn Excel Discussion (Misc queries) 4 October 22nd 08 11:27 PM
Copy / Paste Formula Mark in Long Island Excel Discussion (Misc queries) 1 February 14th 07 05:27 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
why cant I copy and paste a formula? Bryan J Bloom Excel Discussion (Misc queries) 2 November 25th 05 02:47 PM


All times are GMT +1. The time now is 03:34 AM.

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"