We help IT Professionals succeed at work.

Select a range of cells from the active cell

Jagwarman
Jagwarman asked
on
Select a range of cells from the current/active cell

Would appreciate help on selecting a range of cells.

I am saying:

Range("B:B").Find("*Date*", , xlValues, xlWhole, , , False).Select

Then I want to select all non blank cells from wherever the active cell is.

I have tried

ActiveCell.CurrentRegion.Copy but if there is a blank row it stops at that row.


I use Range(Range("A2"), Cells.SpecialCells(xlCellTypeLastCell)).Select when I know the cell to start from but in this case I don't

Appreciate any assistance.

Thanks
Comment
Watch Question

Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
How about
   Range("B:B").Find("*Date*", , xlValues, xlWhole, , , False).Copy
Top Expert 2016
Commented:
Hi,

pls try

Range(Range("B:B").Find("*Date*", , xlValues, xlWhole, , , False), Cells.SpecialCells(xlCellTypeLastCell)).Select

Regards
Top Expert 2015
Commented:
You said then you want to select non blanks only in your range then the code will be....

Range(Range("B:B").Find("*Date*", , xlValues, xlWhole, , , False), Cells.SpecialCells(xlCellTypeLastCell)).SpecialCells(xlCellTypeConstants, 23).Copy

Open in new window

Author

Commented:
Thanks guys

Author

Commented:
Qlemo, thanks but yours only seems to copy the cell with the date