Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
esi esi is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste macro Robert Excel Discussion (Misc queries) 0 April 9th 10 05:18 PM
Using Macro to Copy/Paste LucyN Excel Discussion (Misc queries) 5 October 22nd 08 07:18 PM
HELP with macro for copy and paste RedOctagon Excel Discussion (Misc queries) 0 October 13th 06 02:54 PM
Should I use a macro to copy and paste value? Rebecca Excel Worksheet Functions 0 April 6th 06 10:03 PM
Macro to copy and paste Brian Excel Programming 0 August 28th 03 08:12 PM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"