Copy Cell Above

  • Thread starter Thread starter Materialised[Work]
  • Start date Start date
M

Materialised[Work]

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
 
ActiveCell.Offset(-1).Copy
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = Fals
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top