Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code use a row number in a variable

Status
Not open for further replies.

managementOptions

Instructor
Dec 26, 2010
7
US
I need to get user input to determine what row to copy from a large group of data to a specific row near the top of the spreadsheet.

My thought is to have the user enter the row number they want copied into cell A3. And then that row number would be copied into row 4. So, if the user enters the number 8 into cell A3, a macro could then copy row 8 and paste it into row 4.


So in pseudocode, I think it would something like

dim r as Long
r=the number in A3
Copy row r
move to row 4
paste row

If anyone can make that into real code, I would be very grateful.
 


hi,
Code:
dim r as long
r=input("Enter the number")
rows(r).copy [A4]

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi managementOptions,

You might at least have the courtesy of:
1. telling people you had already posted this in another thread and been answered there - 2. saying why the answer you'd already been given wasn't suitable. So far, you've given no indication that you've even tried the solution I offerred!

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top