Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello All, I have the following macro that copies & pastes some data from E93 to C24... Range("E93").Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False Selection.Copy Range("C24").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True There is a cell B13 that contains a number (positive integer <200). Is there any way I can amend the macro such that instead of pasting the data into cell C24 (as above) it pastes into row C and column number specified by the value in B13. For example, if B13=68 then the macro pastes the data into C68. Any suggestions/comments appreciated. CHEERS -- The Grinch ------------------------------------------------------------------------ The Grinch's Profile: http://www.excelforum.com/member.php...fo&userid=2449 View this thread: http://www.excelforum.com/showthread...hreadid=267170 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub test() Dim i As Long, rngSource As Range, rngDest As Range Set rngSource = Range("E93") Set rngSource = Range(rngSource, rngSource.End(xlDown)) i = Range("B13").Value Set rngDest = Range("C" & i) rngSource.Copy rngDest.PasteSpecial Paste:=xlPasteValues, Transpose:=True ' Application.CutCopyMode = False End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "The Grinch" wrote in message ... Hello All, I have the following macro that copies & pastes some data from E93 to C24... Range("E93").Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False Selection.Copy Range("C24").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True There is a cell B13 that contains a number (positive integer <200). Is there any way I can amend the macro such that instead of pasting the data into cell C24 (as above) it pastes into row C and column number specified by the value in B13. For example, if B13=68 then the macro pastes the data into C68. Any suggestions/comments appreciated. CHEERS -- The Grinch ------------------------------------------------------------------------ The Grinch's Profile: http://www.excelforum.com/member.php...fo&userid=2449 View this thread: http://www.excelforum.com/showthread...hreadid=267170 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying cell contents from many cells and pasting into one cell | Excel Discussion (Misc queries) | |||
Pasting a picture in a cell | Excel Discussion (Misc queries) | |||
pasting content of cell into URL | Excel Discussion (Misc queries) | |||
Pasting on Filtered Data Sheets without pasting onto hidden cells | Excel Discussion (Misc queries) | |||
Pasting numbers and formulas without pasting format. | Excel Discussion (Misc queries) |