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

O.K., my guru friends, here is the problem I am having now.

I have a list of 70 pieces of equipment (how many times have you read that
from me?) And I need to perform a copy from that list which right now is
located in cells CN591:CN662. This range reference will change as rows are
inserted and deleted in the rest of the workbook. (I am unable to place the
list on Sheet2, because I have some conditional formatting that I use on
Sheet 1 and it references this block of cells, so this list must remain on
Sheet 1.)

I have taken this list of equipment and placed it at the top of my sheet in
six columns - H, L, P, T, X and AA and thirteen rows (5 through 17.) But to
get the equipment descriptions in that upper portion of the workbook, I have
used a formula in each of those cells.

H5 =CN591
H6 =CN592
H7 =CN593
etc.
H17 =CN603

Then I run out of room in that column, so in column L I continue the list

L5 =CN604
L6 =CN605
L7 =CN606
Etc.
L17 =CN616

Then I run out of room in that column, so in column P I continue the list

P5 =CN617
P6 =CN618
P7 =CN619
Etc.
P17 =CN629

Then I run out of room in that column, so in column T I continue the list.

Surely you get the picture by now.

My problem comes in when I insert a new piece of equipment or delete a piece
of equipment out of my source range CN591:CN662. I actually delete the row
the equipment was listed on or a insert a new row for the new piece of
equipment.

The ramifications are that the list at the top of the page in columns H, L,
P, T, X and AA either don't show a piece of equipment that I added or give me
a #REF error.

Do you have a solution through a macro to rebuild the formulas up there in
H, L, P, T, X and AA so that when a piece of equipment is added or deleted,
those formulas will rebuild themselves?

I can name the first cell in the range EquipmentTop if that helps my case.

Then can I build the formulas in the H, L, P, T, X and AA in R1C0 format?

H5 =EquipmentTop
H6 =r1c1(EquipmentTop+r1) - something like that?

If I do the formulas that way, will I get an error or a skip if I add or
delete rows?

Tofer

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 Macro macxpert Excel Programming 4 October 30th 05 07:31 AM
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
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 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:17 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"