Hi
Maybe this will help you:
Dim TargetCell As String
TargetCell = "A1" ' change to suit
Range(TargetCell) = 10 ' change to suit or use variable
Range(TargetCell).Copy
Columns("M:M").PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, _
SkipBlanks:=False, Transpose:=False
Range(TargetCell).Clear
Regards,
Per
"blisspikle" <(E-Mail Removed)> skrev i meddelelsen
news:ea199b6a-8ca9-4883-bb92-(E-Mail Removed)...
> Is the anyway use similiar code as below, but create a Range in VBA
> without using an actual range in excel... I would just like to use
> the pastespecial function and divide my selection by a number without
> having to write the number in a cell, then copy it, and then use
> pastespecial, then have to delete the cell.
>
> <Code>
> Selection.Copy
> Columns("M:M").Select
> Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide,
> SkipBlanks _
> :=False, Transpose:=False
> </Code>
>
|