Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Copy/Paste Help
Trying to design a macro that will take a multiple column range say B1:C25
and copy all cells with values, move them up 1 cell and then paste value. I found was doing this manually and the whole process take forever when you're dealing with multiple cells and worksheets. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Copy/Paste Help
esi,
We need more information. What do you do with a value in Cell B1? Where do you move it to? Do you only move values to currently blank cells? Is the whole range shifted, or just some cells? Post back... Bernie "esi" wrote in message ... Trying to design a macro that will take a multiple column range say B1:C25 and copy all cells with values, move them up 1 cell and then paste value. I found was doing this manually and the whole process take forever when you're dealing with multiple cells and worksheets. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Copy/Paste Help
Sub MoveUp()
Dim RangeToMove As Range Dim x, y, z as Integer Set RangeToMove = Selection If RangeToMove.Areas.Count = 1 Then RangeToMove.Copy RangeToMove.Offset(-1, 0).PasteSpecial Paste:=xlValues x = RangeToMove.Rows.Count - 1 y = RangeToMove.Columns.Count - 1 For z = 0 To y RangeToMove.Offset(x, z).Range("A1").ClearContents Next z End If RangeToMove.Select End Sub esi wrote Trying to design a macro that will take a multiple column range say B1:C25 and copy all cells with values, move them up 1 cell and then paste value. I found was doing this manually and the whole process take forever when you're dealing with multiple cells and worksheets. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy and paste macro | Excel Discussion (Misc queries) | |||
Using Macro to Copy/Paste | Excel Discussion (Misc queries) | |||
HELP with macro for copy and paste | Excel Discussion (Misc queries) | |||
Should I use a macro to copy and paste value? | Excel Worksheet Functions | |||
Macro to copy and paste | Excel Programming |