ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automate cut/paste functions - Help! (https://www.excelbanter.com/excel-discussion-misc-queries/30439-automate-cut-paste-functions-help.html)

Greg

Automate cut/paste functions - Help!
 
I am trying to fill in certain information in a column using the cut/paste
function. Specifically Im copying the contents of cell C4 and pasting it
into C5:C7. Now in cell C8 there is a new text that needs to be copied into
C9:C15€¦ then new text in C16 etc etc.. The spacing varies greatly in how many
I have to paste but this repeats for about 25,000 lines or so. Does anyone
have a suggestion on how I can automate this? Please help!!
Thanks!


bj

If it is a non equaiton you want copied, I would probably use a quick macro
similar to

sub fl()
for r = 4 to 25000
if cells(r,3)<"" then xx=cells(r,3) else cells(r,3)=xx
next r
end sub

"Greg" wrote:

I am trying to fill in certain information in a column using the cut/paste
function. Specifically Im copying the contents of cell C4 and pasting it
into C5:C7. Now in cell C8 there is a new text that needs to be copied into
C9:C15€¦ then new text in C16 etc etc.. The spacing varies greatly in how many
I have to paste but this repeats for about 25,000 lines or so. Does anyone
have a suggestion on how I can automate this? Please help!!
Thanks!


Myrna Larson

If I understand your layout correctly, and cells C5:C7, C9:C15, C17:??? etc,
are now blank, do this.

Select all of column C, then Edit/Goto, click the Special button and select
Blanks. One of the empty cells will be the active cell (should be C5 if my
assumptions are correct). In that cell, type an equal sign, point to the cell
above it with the mouse, and press CTRL+ENTER. If the first cell was C5, then
it will contain the formula =C4, cell C6 will have the formula =C5, etc.

To convert these formulas to their values, now select all of column C and
Edit/Copy. Without changing the selection, Edit/Paste Special and select the
Values option.


On Mon, 13 Jun 2005 09:11:02 -0700, "Greg"
wrote:

I am trying to fill in certain information in a column using the cut/paste
function. Specifically I’m copying the contents of cell C4 and pasting it
into C5:C7. Now in cell C8 there is a new text that needs to be copied into
C9:C15… then new text in C16 etc etc.. The spacing varies greatly in how many
I have to paste but this repeats for about 25,000 lines or so. Does anyone
have a suggestion on how I can automate this? Please help!!
Thanks!




All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com