View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default VBA: Column Select then Data Select then return to cell A1

Hi,

It's not entirely clear what you want but maybe this which copies the used
range of column B and pastes it into A2

Sub marine()
Dim LastRow As Long
Set sHt = Sheets("Sheet1")'Change to suit
LastRow = sHt.Cells(Cells.Rows.Count, "B").End(xlUp).Row
Range("B2:B" & LastRow).Copy _
Destination:=sHt.Range("A2")
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"James C" wrote:

How do you write in VBA:-
to select a column then select the range of data held in the column (say B1)
then return to Cell a1. The data in the column can change in the workbook as
it is updated regulary, so the range of data in the column varies constantly.
There are column headings so the range in column B1 must start at B2.

Many thanks
--
James