Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am using the following macro to move data from one sheet to another, call it from A to B. The problem is that it doesn't just move the 500 rows of data from A, it also appears to move every blank row below the data which lists as zeroes when the data is moved over to B. This complicates a second macro which sorts the data in sheet B. Any idea on how to get this macro to only move the data presented in A (the rows will change with time so the macro must be flexible enough to grab the data that is in A no matter how large or small)? Can't thank you guys enough. Sub STEP1_MovingOriginalData() Dim Rng As Range With Worksheets("M_Original_Data") Set Rng = .Range(.Cells(2, 1), .Cells(1, 1).End(xlDown)) End With With Worksheets("M_Original_Data") Range(Rng.Address).FormulaR1C1 = "=A_Original_Data!R[-1]C" End With Columns("B:B").Select Application.CutCopyMode = False Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub -- Sandeman ------------------------------------------------------------------------ Sandeman's Profile: http://www.excelforum.com/member.php...o&userid=32440 View this thread: http://www.excelforum.com/showthread...hreadid=524796 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel macro which prompts for input and moves to a cell - repeated | Excel Worksheet Functions | |||
Macro or Formula that copies and moves data? | Excel Discussion (Misc queries) | |||
calc locks up after running a macro that moves sheets to a new fil | Excel Discussion (Misc queries) | |||
Make more info appear when mouse moves over a macro command button | Excel Programming | |||
Macro That Moves Cursor Down | Excel Programming |