Calculating Cell Range in a Column

  • Thread starter Thread starter geoff
  • Start date Start date
G

geoff

I am using a form to enter values into cells in a column. The number o
cells varies each time the template is used.

I need to select the range of cells, calculate the total and read tha
total into another cell.

I know how to select a fixed range but the problem I have is how t
select the range when the number of cells varies.

Hope this makes sense. Can anyone help?

Geof
 
geoff


to find last used cell in column A

looks from buttom row of spread sheet, finding first cell with an entr
iun column a

R = Cells(Rows.Count, "a").End(xlUp).Row
Range("a1:a" & R).Select

or

looks from first row of spreadsheet, finding 1st blanl cell in colum
a

R = Cells(1, "a").End(xlDown).Row
Range("a1:a" & R).Selec
 
Geoff

Sub selectrange1()
'from activecell in any column to bottom of used range in column including
blanks
Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Select
End Sub


Sub SelectDown()
'to first blank row in active column
Range(ActiveCell, ActiveCell.End(xlDown)).Select
End Sub

Gord Dibben Excel MVP
 
Back
Top