create multiple rows using a variable in a cell as source

Is there a way, to create multiple rows using a variable 
in a cell as source to indicate the number replicated 
rows needed? 

In Excel, I have a name and address and another field to 
indicate how many "rows" I need for that record.  All the 
quantity of replications will be different, that is to 
say, I may need one of this one, but 4 of that one, and 
10 of yet another.  How can I use the quantity variable 
to replicate the row in the worksheet?  

Ideally, I want to use a source worksheet to create a new 
worksheet or better, a workbook, of the replicated rows. 
Any resources or ideas would be appreciated.

I am a beginning VB programmer so I am not adverse to 
make a stab at coding this if need be, but need some 
guidance to get started.

Thanks for any help!

Robert
0
anonymous (74722)
10/24/2003 4:45:15 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
462 Views

Similar Articles

[PageSpeed] 4

Robert,

Copying from XL 2000 help....

Insert Method Example

This example inserts a new row before row four on Sheet1.

Worksheets("Sheet1").Rows(4).Insert
This example inserts new cells at the range A1:C5 on Sheet1 and shifts cells
downward.

Worksheets("Sheet1").Range("A1:C5").Insert Shift:=xlShiftDown
This example inserts a new row at the active cell. The example must be run
from a worksheet.

ActiveCell.EntireRow.Insert

You could use the Insert method to create the number of blank or available
rows that you want.

You can easily add new worksheets as well.

I think your best bet is to think through carefully on what you are trying
to design, and then start.  When you hit speedbumps, ask questions.  It is
difficult for us to comment when we don't fully understand or appreciate
what it is your are attempting to accomplish.  Don't worry, this happens to
all of us when we begin something new.

I hope this post has given you some food for thought.

Regards,
Kevin
<anonymous@discussions.microsoft.com> wrote in message
news:05d101c399e9$9e1371d0$a501280a@phx.gbl...
> Is there a way, to create multiple rows using a variable
> in a cell as source to indicate the number replicated
> rows needed?
>
> In Excel, I have a name and address and another field to
> indicate how many "rows" I need for that record.  All the
> quantity of replications will be different, that is to
> say, I may need one of this one, but 4 of that one, and
> 10 of yet another.  How can I use the quantity variable
> to replicate the row in the worksheet?
>
> Ideally, I want to use a source worksheet to create a new
> worksheet or better, a workbook, of the replicated rows.
> Any resources or ideas would be appreciated.
>
> I am a beginning VB programmer so I am not adverse to
> make a stab at coding this if need be, but need some
> guidance to get started.
>
> Thanks for any help!
>
> Robert


0
stecyk (172)
10/24/2003 4:58:02 AM
Reply:

Similar Artilces:

Autonumber created.. problems in the future?
I managed to create an autonumber in Microsoft CRM. I did this by making a field "Number"(in the database "New_Number") and I published it on the form. Then I went To the SQL server and I changed the field in the table to Identity Yes, Identity seed 1, Identity Increment 1. I locked the field on the form. It worked! I think that this is not supported by Microsoft. But has anybody got any idea which troubles i could get with this configuration? San ________________________________ Do you know all add-ons for Microsoft CRM? Visit http://www.pimpmycrm.com The biggest dange...

hide a row
I have a worksheet with information in column A and B. If Column B has no information I want to do nothing, but if there is something in Column B, I would like to hide the row. Is this possable in an if statement? Hi not possible with a formula. This would require VBA -- Regards Frank Kabel Frankfurt, Germany "Bob" <bobolah@hotmail.com> schrieb im Newsbeitrag news:OSOK8hisEHA.2556@tk2msftngp13.phx.gbl... > I have a worksheet with information in column A and B. > > If Column B has no information I want to do nothing, but if there is > something in Column B, ...

Auto transfer of row
I have a list of components to be ordered in each row is a cell with order number entered in it. What I want is to copy the row to anothe sheet (which is to be displayed at goods) when the order number i entered in that cell. Is this possible? many thanks for any help -- alanle ----------------------------------------------------------------------- alanled's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3094 View this thread: http://www.excelforum.com/showthread.php?threadid=57297 this could be acheived by using VLOOKUP function. if you want a perfect soluti...

Changing Cells and entering data in them
Thanks for the help again. Big thanks to Steve you've got me this far. I went out and bought a book, but it's like reading a foreign language. I was informed today that I can't have message boxes come up. I need to have the code point at the cells and if they are blank turn which ever one is blank red or if both are then both turn red then pause for each cell to be filled in. Cell F14 "Last Name" then automatically go to Cell F16 "First Name" on tab or enter. Basically if Cell F22 or F23 has an X in it, Cells F14 an F16 turn red and cell F14 has the focus...

Using Relative path for XML data file?
Is there a way to specify a relative path to an XML data file imported into Excel 2003? I am writing a web app that generates report data as XML for the user to download to their local machine. This data is to be consumed by an Excel reporting spreadsheet, which contains display-formatted tables and charts that are mapped to various data fields in an XML Map, which is in turn linked to the xml data file they will download. The idea is the user only needs to download the data for updates, not the whole spreadsheet. However, since I cannot predict the path where the user will store their...

Formula without using numbers after decimal in the answer
I have a formula that derives the answer from a figure with a decimal. I don't want to use the figures after the decimal. Is there a way to just use the whole number and omit the numbers after the decimal without having to manually key in all these numbers manually? Thanks, Mustang You can use the INT function. This 'rounds down' any number to th nearest integer, e.g. if A1=2.567, a formula in B2 of =INT(A1) return 2 HTH Bruc -- swatsp0 ----------------------------------------------------------------------- swatsp0p's Profile: http://www.excelforum.com/member.php?...

explanation of codes in Visual Basic when creating User form
Hi, I am trying to create a user form in Visual Basic however I'm trying to teach myself by reading/watching tutorials. (www.contectures.o.ca, etc) A lot of the instructions I am seeing simply give the code rather than explain how to actually write one from scratch. So... I need to know what each 'term' means so I can understand how the codes work. Any help is much appreciated :) One of the first codes is for the Add button Private Sub cmdAdd_Click() Dim iRow As Long Dim ws As Worksheet Set ws = Worksheets("PartsData") What d...

default values in a cell
Hello, can you help me please Cell B1 contains a complex mathematical formula which requires (in several places) a number from cell A1. Cell A1 can contain any integer number, but it is usually the same (30). I would like to be able to leave cell A1 empty, and only enter a number when it is not 30 , ie the default value of A1 is 30, unless specified. How do I go about this ? Should I look at conditional formatting, or put lots of IF functions into an already complex formula? Thank as always KK Use 2 cells Modify the complex formula to use B1 rather than A1 ( or any other un-u...

Certain Keys/Characters not recognised when creating a task
I've just attempted to create a task and the edit control for the subject of the task refused to accept the characters c h s t u and v. I was able to switch to other applications such as a command prompt and internet explorer and type the characters quite happily (so there is nothing wrong with the keyboard) but when I switch back to Outlook it will not recognise them. I'm using Outlook2003 as installed with Office 2003 Professional (SP1 and all other updates applied). As a last resort I closed down Outlook and restarted the program which is now accepting the keys/characters. A...

Show date, time & day of week in one cell
Can I show the date, time and day of week in one cell. I have: 09/03/07 8:30 AM in one cell using the format (Format/Cells/Custom): [$-409]mm/dd/yy h:mm AM/PM;@ Excel refuses to accept ddd for Mon or dddd Monday at the end of the format I want it to read: 09/03/07 8:30 AM Monday in 1 cell. I have Excel 2003. One way: mm/dd/yy h:mm AM/PM dddd;@ In article <Xns99B8A3CAF9130pencilunlistedcom@208.49.82.220>, Burp <burp@beep.comINVALID> wrote: > Can I show the date, time and day of week in one cell. > > I have: > 09/03/07 8:30 AM > in one cell using the for...

print multiple pages on one sheet of paper
I am using mailmerge in Publisher to create placecards for a party we are hosting. The final size of the placecards is 1.5" by 1.5" and we have to print 100 final cards. Publisher gives me the option of printing multiple copies of the same page on one sheet of letter sized paper or one page on one sheet of letter sized paper. What I would like to do, however, is print multiple different pages on one sheet of paper. If I cannot find a solution for this, I will need to print 100 separate pages with a 1.5" square box of copy in the center of each sheet. In page setup, sel...

How to delete a set of rows depending on Value
I have two worksheets Worksheet A 27 Columns 1600 Rows. Worksheet B 1 Column 200 Rows I need Worksheet A to look at each cell in Worksheet B, if a cell exists in Worksheet A, then I need the row deleted... Basically I have a list of Grand list of items to do, then a list of items already completed. I need to now remove all entries in the grand list that have been completed. Is this feasible or should I look at using some Unix script. It sounds like you could use VLOOKUP to find out if the value in B exists on A: http://www.officearticles.com/excel/vlookup_formulas_in_microsoft_excel....

How to create an autonumber field?
hi i need to create an autonumber field to automate account numbering. how can i do this? thanx You can do this using a post callout piece of code so when you update an account this code is called which calls back into the platform and works out the last account number then adds one to it and updates the account record. look on msdn.microsoft.com under crm for examples -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "Max" <Max@discussions.microsoft.com> wrote in message news:0ABFF244-EC0A-48EC-9E76-7CA61E6EBC3A@microsoft.com... > hi > > i need ...

How do I overlay text to a row without loosing the text in the ba.
I would like to know how to give an entire row (or column) a text overlay such as "VOID" and still be able to view the text in the underlaying row (or column). Thanks in advance. Use WordArt from the Drawing toolbar. Change the Fill to None. -- Jim Rech Excel MVP "Bruce Charles" <Bruce Charles@discussions.microsoft.com> wrote in message news:C430F6BC-1EBD-461F-A3FA-EC8592C5704C@microsoft.com... |I would like to know how to give an entire row (or column) a text overlay | such as "VOID" and still be able to view the text in the underlaying row (or | c...

Disable Secure Sockets Layer on exchange server when using RPC over HTTP
Hi im trying to enable RPC over HTTP to enable users to establish contact to my Excahger server 2003 over the internet. Now, I dont want to use SSL (security not that important) and i am told by this article that i can disable SSL in windows registry. Quote: Note While RPC over HTTP does not require Secure Sockets Layer, you must modify the registry to enable RPC over HTTP if you do not want to use Secure Sockets Layer. Microsoft recommends that you enable and require Secure Sockets Layer for your RPC over HTTP communications. At this address: http://support.microsoft.com/?id=833401 But i ...

using the journal on outlook
Once I link an email to the journal, can I still find that email in my mail box? I seem to be able to get to it only via the journal. If this is the way it is supposed to be, how do I remove it from the journal and get it back into my mail box? Am I just missing something? -- thanks, Independent Are you linking to the item or putting a copy into the journal item? Also, has the item been archived or not? "Independent" <Independent@discussions.microsoft.com> wrote in message news:868279F2-53C8-403A-97F5-604CEECD873C@microsoft.com... > Once I link an email to the journ...

Call & Place Graphic Based on Cell Value?
Is there any way to call & place a graphic image based upon a cell value? Maybe you can look at J.E. McGimpsey's page: http://www.mcgimpsey.com/excel/lookuppics.html documike wrote: > > Is there any way to call & place a graphic image based upon a cell value? -- Dave Peterson ...

Let me use the Line Color icon on charts
It would speed up a lot of my work if I could use the Line Color icon on Excel charts, the same way I am able to use the Fill Color and Font Color icons. However, when I highlight any chart object, like the Plot Area, Chart Area, or a Series, the Line Color icon is disabled. -- Stuart Bratesman, Jr., MPP Muskie School of Public Service Univ. of Southern Maine Portland, Maine ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If ...

Does Outlook use the DAV protocol?
I'm an Outlook Express user who wants to switch to Outlook. I received a notice from Microsoft that includes the following: "... as of June 30, 2008, Microsoft is disabling the DAV protocol and you will no longer be able to access your Hotmail Inbox via Outlook Express." Please tell me if this action by Microsoft will affect Outlook in the same manner, or am I free to make the switch. "BudV" <BudVitoff@(NO)att.(SPAM)net> wrote in message news:%230XUDi%23zIHA.2384@TK2MSFTNGP02.phx.gbl... > I'm an Outlook Express user who wants to switch to Outlook...

How do I lock individuals cells within an Excel spreadsheet so th.
i am trying to lock cells that have formulas in them, but other cells in the spreadsheet need to be unlocked so the end users can enter information. Hi first select the cells for which you want to allow entries and goto 'Format - Cells - Protection' and uncheck 'Locked'. Now protect the sheet 'Tools - Protection' "ucastores" wrote: > i am trying to lock cells that have formulas in them, but other cells in the > spreadsheet need to be unlocked so the end users can enter information. ...

How can I change text to proper text in multiple cells.
I need to change names that are all in caps to proper case in 100 cells. If I click each one individually, it works, but I need to be able to perfomr this funcion automatically on all the cells. One other post said to be sure calc is set to automatic and mine is. Any instruction is most appreciated. Thank you. Insert a helper column to the right of the column with the names. Then use a formula like: =proper(a1) and drag down that column Then select that column edit|copy select the original range Edit|paste special|Values And then delete the helper column. bethye99 wrote: > > I...

how to create a multiple conditional formula
I am trying the find a solution for the following multiple formula (example); IF(A1="K"; B1+(B1*C10);B1) AND IF(A1="N";B1+(B1*C11);B1). So actually two expressions in one formula. I can't find a good solution. Is there anybody who can help me? Thank you in advance. Ad Buijs =B1+B1*IF(A1="K",C10,if(A1="N",C11,0)) "Ad Buijs" wrote: > I am trying the find a solution for the following multiple formula (example); > IF(A1="K"; B1+(B1*C10);B1) AND IF(A1="N";B1+(B1*C11);B1). So actually two > expressions ...

Please Help with Multiple Field Primary Keys
I have two tables in a database that have to use four fields for a unique identifier and primary key. How do I set up a query to set a relationship between those four fields together as one? When I add the tables to the query I see the fields, but I am not having any success properly setting the relationships. The upper half of the query design window is where the 2 tables appear. Drag Field1 from Table1, and drop it into Field1 from Table2. Access displays a join line from one table to the other. Drag Field2 from Table1, and drop it into Field2 from Table2. Repeat for the other 3 f...

How can I create Schedule Chart?
I have simply an activity list which shows START and FINISH date of related activity. I need to put this information into a Chart, so that i will get a bar chart highligting the line between the START and FINISH date of the activity. It is very similar to what we can create in Microsoft Project. Do you know a specific chart type for this? It's called a Gantt chart: http://office.microsoft.com/en-us/excel/HA010346051033.aspx http://peltiertech.com/Excel/Charts/GanttLinks.html http://www.mrexcel.com/tip058.shtml -- David Biddulph "mezzanine1974" <savas_karaduman@yahoo.com>...

Is there a way to cut off unused cells on a sheet
It seems there are an infinite number of cells on a sheet. As I really dont have much info to enter on each sheet I was hoping there was a way I could somehow cut off all the extra stuff to the sides and bottoms. It is a hassle because everytime I scroll, it will scroll off the side or bottom way past what I was looking for. Thanks! A manual way is to goto the last used row and delete all rows below. Do the same with columns. SAVE -- Don Guillett SalesAid Software donaldb@281.com "newbie" <newbie@discussions.microsoft.com> wrote in message news:469AABE7-8D17-4B72-91C1-...