Selecting used cells

pells

Active Member
Joined
Dec 5, 2008
Messages
361
Is it possible to select cells where there is something in them, copy them and past them to a new sheet in the same workbook and skip all blanks?

For example, if there is something in cell B11, B15 & B20 in sheet1 copy the contents and past them into the same cells in sheet2. I will need to be specific to start to look in Cell B11, not the whole sheet1 from A1.

Many thanks.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Maybe like this

Code:
Sub test()
Sheets("Sheet1").Columns("B").SpecialCells(xlCellTypeConstants).Copy Destination:=Sheets("Sheet2").Range("B1")
End Sub
 
Upvote 0
Maybe like this

Code:
Sub test()
Sheets("Sheet1").Columns("B").SpecialCells(xlCellTypeConstants).Copy Destination:=Sheets("Sheet2").Range("B1")
End Sub
Hi - many thanks for this, but I need to be able to select from B11, not the whole of column B.

So if there is something from B11 copy, else skip it.

Is this possible?
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

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