Shift Data to a Specified Row

rwmill9716

Active Member
Joined
May 20, 2006
Messages
467
I collect data in columns A and B. I need a function statement or macro that reads cell C1 and then shifts my data to that row in columns C and D.

Thanks for your help
Ric


Excel 2012
ABCD
1Starting Row:9
2Date/TimeFactor 2Date/TimeReset
38/12/2016 12:5555.55
48/13/2016 0:0356.11
58/14/2016 0:0356.21
68/15/2016 0:0056.10
78/16/2016 6:0056.15
88/17/2016 0:2155.92
98/23/2016 0:0556.278/12/2016 12:5555.55
108/24/2016 0:0556.178/13/2016 0:0356.11
118/24/2016 21:0056.328/14/2016 0:0356.21
128/25/2016 22:3056.308/15/2016 0:0056.10
138/26/2016 22:4756.378/16/2016 6:0056.15
148/27/2016 22:3656.308/17/2016 0:2155.92
Sheet2
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

MickG

MrExcel MVP
Joined
Jan 9, 2008
Messages
14,841
Try:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG07Dec46
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A3"), Range("A" & Rows.Count).End(xlUp))
Rng.Resize(, 2).Cut Cells([c1], "C")
'[COLOR="Green"][B]Change "Cut" to "Copy" if thats what you want[/B][/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

BarryL

Well-known Member
Joined
Jan 20, 2014
Messages
1,436
Office Version
  1. 2019
Platform
  1. Windows
  2. MacOS
maybe:

Code:
Sub shift_data()
Dim lr As Long, rowno As Long
Let lr = Range("A" & Rows.Count).End(xlUp).Row
Let rowno = Range("C1").Value
Range("A3:B" & lr).Copy
Range("C" & rowno).PasteSpecial xlPasteValues
Application.CutCopyMode = False
End Sub
 
Upvote 0

Forum statistics

Threads
1,195,600
Messages
6,010,651
Members
441,558
Latest member
lambierules

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top