VBA to Copy Data

geoffbird

New Member
Joined
Sep 25, 2013
Messages
11
Hey,

I am sure this is simple for a lot of people here and would really appreciate the help.

Basically I am looking to copy data into the next empty cell using VB

I have a data set in S2:S292. I would like to copy this into cell C2. If C2 has values already within this then copy to D2. if D2 has values then E2 etc etc etc.

Thanks in advance!!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I was hoping to do this with some sort of loop but I have managed another way.

For anyone who mkay be interested I have used the below to find the next blank cell and offset 1 column before pasting.

Range("S2:S292").Select
Selection.Copy
Range("A2").Select
Selection.End(xlToRight).Offset(0, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
 
Upvote 0
Hi Geoff

Glad to see you sorted out your problem yourself - just a question - what happens when you have used up all the columns between C and S?

Regards
John
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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
Back
Top