Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to reference variable worksheets and variable row



Hi all


How do i write "Get row W from worksheet X and copy row W to row Y
(inserting row W in the position where row Y is) on worksheet Z" in VBA?

WXYZ would be variables in my script.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How to reference variable worksheets and variable row

Hi glenn:

After we get row W, should we just put the data into row Y, or insert a new
row above Y and put the data into the newly inserted row?
--
Gary''s Student - gsnu200747


"glenn" wrote:



Hi all


How do i write "Get row W from worksheet X and copy row W to row Y
(inserting row W in the position where row Y is) on worksheet Z" in VBA?

WXYZ would be variables in my script.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default How to reference variable worksheets and variable row

One way:

Worksheets(X).Rows(W).Copy Destination:=Worksheets(Z).Rows(Y)




In article , glenn
wrote:



Hi all


How do i write "Get row W from worksheet X and copy row W to row Y
(inserting row W in the position where row Y is) on worksheet Z" in VBA?

WXYZ would be variables in my script.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to reference variable worksheets and variable row

Gary''s Student wrote:
Hi glenn:

After we get row W, should we just put the data into row Y, or insert a new
row above Y and put the data into the newly inserted row?


Hi thanks to everybody for the answers.

Yes, insert a new row above Y an put the data from row W into the newly
inserted row! Like whe you want to copy columns headers rows to another
worksheet that contains data.

thanks!
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
Formula that sums/counts across worksheets with variable reference andy62 Excel Discussion (Misc queries) 1 March 28th 09 01:48 AM
reference other worksheets via variable names Huggy Excel Worksheet Functions 4 June 26th 08 05:52 AM
Using variable as row reference in VBA Deecrypt Excel Programming 1 December 7th 06 08:44 AM
Variable reference John[_44_] Excel Programming 1 August 8th 03 04:53 PM
Using a variable as a row reference? mjmorrison Excel Programming 2 July 14th 03 07:51 PM


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