Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro copy of variable ranges in one sheet to table in another she

I am trying to make a "simple to use" way of generating buy-requisitions and
reccording the individual purchases in a table.
Each requisition will have 1 to 20 lines (rows) and each line will consist
of 12 cells. 2 of the cells are keyed in manually the rest are generated (
"IF" / "VLOOKUP" /etc).
First cell in first line/row is A14 - last cell in first row is L14.
Last cell in last row is in column L, but may be any of the rows 14 to 33.

Making the lines in the requisition is no problem. My problem occurs when I
try to reccord a macro that finds and selects range. I have used END,
UP/DOWN/LEFT/RIGHT and SHIFT in various sequenses - Then COPY and at
destination PASTE SPECIAL / VALUES. It works when done manually, but when
macro-reccorded the ranges are fixed (absolute) and the execution of the
macro does not adapt to the actual number of lines in the requisition.

Next similar problem comes when I try to locate the end of the table to
which the copied lines should be added. Here too it works manually, but when
reccorded in macro "it freezes the positions" and does not find the actual
last line/cell in the table as the table grows.

I am not more than superficially familiar with VBA so I am not able to write
code directly by myself. I can imagine that some loops finding the borders af
an area and the last row may be needed, but I hope it may be solved mainly by
reccording macro. Please help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro copy of variable ranges in one sheet to table in another she

See this page Kaare
http://www.rondebruin.nl/copy1.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Kaare" wrote in message ...
I am trying to make a "simple to use" way of generating buy-requisitions and
reccording the individual purchases in a table.
Each requisition will have 1 to 20 lines (rows) and each line will consist
of 12 cells. 2 of the cells are keyed in manually the rest are generated (
"IF" / "VLOOKUP" /etc).
First cell in first line/row is A14 - last cell in first row is L14.
Last cell in last row is in column L, but may be any of the rows 14 to 33.

Making the lines in the requisition is no problem. My problem occurs when I
try to reccord a macro that finds and selects range. I have used END,
UP/DOWN/LEFT/RIGHT and SHIFT in various sequenses - Then COPY and at
destination PASTE SPECIAL / VALUES. It works when done manually, but when
macro-reccorded the ranges are fixed (absolute) and the execution of the
macro does not adapt to the actual number of lines in the requisition.

Next similar problem comes when I try to locate the end of the table to
which the copied lines should be added. Here too it works manually, but when
reccorded in macro "it freezes the positions" and does not find the actual
last line/cell in the table as the table grows.

I am not more than superficially familiar with VBA so I am not able to write
code directly by myself. I can imagine that some loops finding the borders af
an area and the last row may be needed, but I hope it may be solved mainly by
reccording macro. Please help.

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 a pivot table to another sheet in a macro Aline Excel Discussion (Misc queries) 1 April 19th 10 02:17 AM
Activate an variable located workbook and copy 2 ranges? will-d[_2_] Excel Programming 6 January 17th 08 07:09 PM
Recording a macro to copy into a series of variable ranges peters Excel Programming 3 August 10th 07 10:44 PM
Counting variable ranges and auto-summing variable ranges Father Guido[_5_] Excel Programming 2 March 29th 06 04:07 AM
Copy variable ranges fron difernte shets optimus_1973 Excel Worksheet Functions 2 January 8th 06 04:39 AM


All times are GMT +1. The time now is 12:57 PM.

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"