VBA Copy and Paste

Shamos

New Member
Joined
Jun 27, 2013
Messages
11
Hi,

My ability using Macro's is limmited so please excuse the bad code!

I'm trying to use VBA to transpose and paste data from one sheet to another.

I can get the first row and the start of the second as B:B will always have data, however C:C may have blank cells depending on the avaliable options.

How do I get C:C to align / start where Range("B:B").Find(""). starts?

How do I get my code to drop down a row on sheet one till it hits a blank?

Thanks

Sub shauns_1()
'

Application.DisplayAlerts = False

Sheets("Selectable Options").Select
'Range("A2").Select
'Selection.Copy
'Sheets("Sheet2").Select
'Range("A1").Select
'ActiveSheet.Paste
Sheets("Selectable Options").Rows("1:1").Select
'Rows("1:1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Selectable Options").Select
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("C1").Select
Sheets("Selectable Options").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Columns("C:C").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Selectable Options").Select
Rows("1:1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B:B").Find("").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Selectable Options").Select
Rows("3:3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B:B").Find("").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True

End Sub
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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