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 pasting a forumla down for a known dataset

Hi all,

First post - so please be gentle!

I've a spreadsheet with a macro that works as follows:

1. the user pastes some data into B4 to Bn (variable range) and for a
fixed set of columns
2. the formula that is in cell A4 needs to be copied down to all the
rows of data.

Below is the code i use...

Sheets("TB").Select
LastRowTB = Cells.Find(What:="*", After:=[A1],
SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("A4").Select
Selection.Copy
For rowcounter = 1 To LastRowTB - 3
Range("A4").Offset(rowcounter, 0).Select
ActiveCell.PasteSpecial Paste:=xlAll
Next


the problem is that when it runs, it takes forever to move row to row -
up to 2 or 3 seconds per row. I've used debug lines to show that the
line ActiveCell.PasteSpecial Paste:=xlAll is at fault but this has not
helped as i cannot see why this is failing.

I have been thinking about defining the whole range from A4 to An and
then pasting but i can't work out how to define the range and then use
to as a paste location.

Any help gratefully received.

Rob.

 
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
Keeping forumla cell reference after cut and pasting Eli[_4_] Excel Discussion (Misc queries) 4 August 12th 08 01:15 AM
pasting a forumla w/o the paste/special/value jc3000 Excel Discussion (Misc queries) 1 June 21st 07 02:13 PM
pasting a forumla w/o the paste/special/value NewGuy Excel Discussion (Misc queries) 0 June 20th 07 11:29 PM
Converting A Quarterly Dataset to Weekly Dataset Dan Thompson Excel Programming 5 November 25th 05 09:27 PM
Sum a dataset with 2 criteria ineedhelp2[_5_] Excel Programming 0 August 24th 05 09:44 PM


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