Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Here is my dilemma. I have an entry in column A. I need this entry duplicates
the amount of times by the number in column b (if column b was 20 would populate the entry from column A in columns c-v). I have about 50 rows that I need duplicated and some need to be done 3 times and others 70 times. How can this be done? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe just a small macro:
Option Explicit Sub testme() Dim FirstRow As Long Dim LastRow As Long Dim iRow As Long Dim HowMany As Variant With Worksheets("sheet1") FirstRow = 1 'no headers in row 1? LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For iRow = FirstRow To LastRow 'minor validation here HowMany = .Cells(iRow, "B").Value If IsNumeric(HowMany) Then .Cells(iRow, "C").Resize(1, HowMany) = .Cells(iRow, "A").Value End If Next iRow End With End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm gennario wrote: Here is my dilemma. I have an entry in column A. I need this entry duplicates the amount of times by the number in column b (if column b was 20 would populate the entry from column A in columns c-v). I have about 50 rows that I need duplicated and some need to be done 3 times and others 70 times. How can this be done? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
Filling in a number x, y times in y cells | Excel Worksheet Functions | |||
How do I limit the number of times an Excel workbook can be opene. | Excel Discussion (Misc queries) | |||
Can the number of times undo is used in Excel 2002 be increased? | Setting up and Configuration of Excel | |||
how do I get a calculation to repeat various number of times? | Excel Worksheet Functions |