borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (just so simple but can\'t figure out)Next Topic (Auto forward certain parts of an email) New Topic New Poll Post Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Insert rows based on a value in column
Poster Message
NewGal
Level: Trainee

Registered: 24-09-2005
Posts: 1

icon Insert rows based on a value in column

Is there a way to insert new duplicate rows in an excel worksheet based on a value in a column? For example I have 2 columns as follows

Place     Number
London    3
Paris       5
Lisbon     2
France    2

I want to achieve the following

Place    Number
London  3
London  3
London  3
Paris     5
Paris     5
Paris     5
Paris     5
Paris     5
Lisbon   2
Lisbon   2...and so on

So I basically want the first column and its value repeated the number of times specified by the associated value in the Number column. I hope that makes sense. I hope someone can help as this is driving me nuts and I am not too clever with Excel

24-09-2005 at 10:21 AM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 891
icon Re: Insert rows based on a value in column

Hi Newgal,
Do you still need assistance in this?
Kieron


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

19-10-2005 at 10:24 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Insert rows based on a value in column
Previous Topic (just so simple but can\'t figure out)Next Topic (Auto forward certain parts of an email) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder