Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to copy down specific number of rows
Cell A1 contains Username and cell B1 contains a number
indicating how many times the names should be replicated in the database. Please help with a macro to do this. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to copy down specific number of rows
Cell A1 contains Username and cell B1 contains a number
indicating how many times the names should be replicated in the database. try this: Range("A2:A" & Range("B1").Value).Value = Range("A1").Value -- Mit freundlichen Grüssen Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to copy down specific number of rows
Cell A1 contains Username and cell B1 contains a number
indicating how many times the names should be replicated in the database. I forgot a value: Range("A2:A" & Range("B1").Value + 1).Value = Range("A1").Value -- Mit freundlichen Grüssen Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to copy down specific number of rows
Using Resize might be clearer in terms of intent. Just offered for
consideration. Range("A2").Resize(Range("B1").Value ,1).Value = Range("A1").Value -- Regards, Tom Ogilvy "Melanie Breden" wrote in message ... Cell A1 contains Username and cell B1 contains a number indicating how many times the names should be replicated in the database. I forgot a value: Range("A2:A" & Range("B1").Value + 1).Value = Range("A1").Value -- Mit freundlichen Grüssen Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to copy down specific number of rows
Hi Tom,
Tom Ogilvy schrieb: Using Resize might be clearer in terms of intent. Just offered for consideration. Range("A2").Resize(Range("B1").Value ,1).Value = Range("A1").Value thus it goes naturally also :-) -- Mit freundlichen Grüssen Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy specific rows to different work sheets | New Users to Excel | |||
Copy / paste only specific rows | Excel Discussion (Misc queries) | |||
how can i automate the copy-insertion of a specific number of rows | Excel Worksheet Functions | |||
INserting Specific Number of Rows via macro | Links and Linking in Excel | |||
COPY AND PASTE SPECIFIC ROWS | Excel Discussion (Misc queries) |