Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Range in VBA Code and using Pastespecial
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" skrev i meddelelsen ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"PasteSpecial method of Range class failed" when range Number of Rows 2000 | Excel Programming | |||
Pastespecial code | Excel Programming | |||
Code for meet cond, copy, pasteSpecial, ValuesOnly | Excel Programming | |||
Range Name Duplication and PasteSpecial Macro | Excel Programming | |||
VB PasteSpecial when range changes | Excel Programming |