Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I am wondering if anyone would be kind enough to provide me with a code sample (and maybe a explanation) of how to copy the cell above the active cell and paste it into the active cell from a macro. I have tried a few things, but have come no where close, and this macro, simple as it is, would greatly improve my output as I am generating pivot tables from data imported from Microsoft Navision. Thanks Mick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ActiveCell.Offset(-1).Copy ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = Fals -- Nick ----------------------------------------------------------------------- Nicke's Profile: http://www.excelforum.com/member.php...nfo&userid=293 View this thread: http://www.excelforum.com/showthread.php?threadid=27110 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.Value = ActiveCell.Offset(-1).Value
"Materialised[Work]" wrote: Hi All, I am wondering if anyone would be kind enough to provide me with a code sample (and maybe a explanation) of how to copy the cell above the active cell and paste it into the active cell from a macro. I have tried a few things, but have come no where close, and this macro, simple as it is, would greatly improve my output as I am generating pivot tables from data imported from Microsoft Navision. Thanks Mick |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mick
Here's a sample: Sub CopyFromAbove() On Error GoTo Error ActiveCell.Value = Cells(ActiveCell.Row - 1, ActiveCell.Column).Value Error: Exit Sub End Sub CU Mike "Materialised[Work]" schrieb im Newsbeitrag om... Hi All, I am wondering if anyone would be kind enough to provide me with a code sample (and maybe a explanation) of how to copy the cell above the active cell and paste it into the active cell from a macro. I have tried a few things, but have come no where close, and this macro, simple as it is, would greatly improve my output as I am generating pivot tables from data imported from Microsoft Navision. Thanks Mick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell | Excel Worksheet Functions | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? | Excel Programming |