Avatar of Candace Hagood
Candace Hagood
Flag for United States of America asked on

Excel Insert row and count down

Hi All,
Trying to create a function or any approach that will produce the following.  Any ideas are welcome.
I have a worksheet with active products. Each row as details such as item number, version, sku and price. I need a function that looks at the version and if its is anything higher than 1, insert a duplicate line below for the number of previous versions. copy all data except the version number. that needs to count down.  So if it is version 22, the function will insert 21 lines below it (without overwriting lines that are already there).  Each line is a duplicate of the original except for the version, which is a count down to 1.  There are no 0 versions.


thank you so much in advance


VB Script* Excel TableVBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon
Martin Liss

Please attach a sample workbook that has one worksheet with a few rows data and a second worksheet showing the desired results.
ASKER CERTIFIED SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck