Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is one logical line.
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False The space character followed by the underscore character means that it's continued on the next physical line. zyus wrote: Tried but pop op compile & syntax error and item highlighted as per below Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, "Faraz A. Qureshi" wrote: You could use the following macro by: 1. Right click on the sheet tab at the bottom; 2. Selecting View Code; 3. Copy paste the following code: Sub Macrox() Dim x As Integer Dim y As Integer y = 1 Selection.Copy x = ActiveCell.Offset(1, 0).Value ActiveCell.Offset(2, 0).Select Do Until x = y ActiveCell.Offset(1, 0).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False y = y + 1 Loop Application.CutCopyMode = False End Sub 4. Now, CLICK/ACTIVATE cell where the value to be copied & pasted is present (forexample A1). The number of times the cell is to be pasted is the cell below it (in this example A2) 5. Go back to the sheet; 6. Press Alt+F8; 8. Select Macrox to be run; 9. Use it on any other column. -- Do check "Yes" if this post is helpful, Best Regards, Faraz "zyus" wrote: I want to copy based on value in a cell ex A1 value $100 A2 value 5 i exp that i could run some function to copy $100 five times in cell A3,A4,A5,A6 & A7. I have about 300 columns with different types of values Thanks -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy cells to variable number of rows | Excel Discussion (Misc queries) | |||
copy cell from file with variable name | Excel Worksheet Functions | |||
VBA help to copy variable range | Excel Discussion (Misc queries) | |||
copy down with variable number of rows | Excel Discussion (Misc queries) | |||
Locating variable range to copy | New Users to Excel |