Re: Macro to copy down specific number of rows

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 04/26/04


Date: Mon, 26 Apr 2004 07:40:03 -0400

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" <Melanie.BredenNOSPAM@mvps.org> wrote in message
news:c6ik0u$caj9o$1@ID-200118.news.uni-berlin.de...
> >> 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)
>


Relevant Pages