Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating Cell Range in a Column

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

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating Cell Range in a Column

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

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Calculating Cell Range in a Column

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

On Sun, 29 Feb 2004 16:46:16 -0600, geoff
wrote:

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

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

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

Hope this makes sense. Can anyone help?

Geoff


---
Message posted from http://www.ExcelForum.com/


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate values in an unlimited range of cells in a column WITHOUTalso calculating values that had previously been filtered AGAINST? yadang Excel Discussion (Misc queries) 2 October 1st 09 06:18 PM
Best-fit column based on a cell range Jeff Excel Discussion (Misc queries) 2 January 9th 09 08:50 PM
cell column number for the max value of a range of numbers Aline Excel Discussion (Misc queries) 1 February 22nd 07 08:36 AM
Is there any way of calculating a running total within a single cell in a column Janev New Users to Excel 2 September 13th 06 01:22 PM
Next cell in a range, by row not column? Alan Beban[_3_] Excel Programming 0 August 12th 03 07:22 AM


All times are GMT +1. The time now is 06:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"