Macro for copying and pasting (related to answered question)

Closed
kk - Mar 29, 2017 at 12:57 PM
Hello,

You recently provided this answer to a question (see below). I'd like to do almost exactly what you recommend, except my spreadsheet has significantly more columns (A through AK, specifically), and I only need to repeat my rows according to values in specific columns. How can I alter the code you provided to account for my additional columns of info? I tried on my own and I get an error, so I need some guidance as to what I need to change about your original answer.

So in the sample data from the previous question:

l Code l Name l JAN l FEB l MAR l
l 145 l Socks l 20 l 74 l 52 l
l 992 l Bags l 52 l 102 l 278 l

Mine looks more like this:

l Code l Name l Place | Phone | URL | JAN l JANupdate | FEB l MAR l
l 145 l Socks l someplace | 234-5678 | www.example.com | 20 l 100 | 74 l 52 l
l 992 l Bags l someplaceelse | 567-8910 | www.example2.com |52 l |200 | 102 l 278 l

and I want it to look like this:

l Code l Name l Place | Phone | URL |Month l Monthupdate | Amount
l 145 l Socks l someplace | 234-5678 | www.example.com |JAN l 100 | 20
l 145 l Socks l someplace | 234-5678 | www.example.com |FEB l [null] | 74
l 145 l Socks l someplace | 234-5678 | www.example.com |MAR [null] l 52
l 992 l Bags l someplaceelse | 567-8910 | www.example2.com |JAN l 200 | 52
l 992 l Bags l someplaceelse | 567-8910 | www.example2.com |FEB| [null] l 102
l 992 l Bags l someplaceelse | 567-8910 | www.example2.com |MAR | [null] l 278

I've pasted your reply below (related to this question: Macro to copy/paste down X times (where X is the number of rows) [Solved/Closed])