Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I'm wondering if there is a way to assign a range starting (or ending) cell
location based on a variable number. For instance, say I have cells B1 through B20 and want to take an average, but not of the entire range. Say I only want to average B5:B20 but the "5" is given to me by a separate equation. Is there a way to write =AVERAGE(B???:B20) so that the ??? is referenced to another cell? That way I can cite a range based on a variable starting point. Thanks, Dave by the way, these newsgroups are awesome |
#2
![]() |
|||
|
|||
![]()
Yes - you can use indirect for this, e.g.;
=AVERAGE(INDIRECT("B"&C4&":B20")) where C4 would be the cell containing 5 (you could put your other formula in its place). "feman007" wrote in message ... I'm wondering if there is a way to assign a range starting (or ending) cell location based on a variable number. For instance, say I have cells B1 through B20 and want to take an average, but not of the entire range. Say I only want to average B5:B20 but the "5" is given to me by a separate equation. Is there a way to write =AVERAGE(B???:B20) so that the ??? is referenced to another cell? That way I can cite a range based on a variable starting point. Thanks, Dave by the way, these newsgroups are awesome |
#3
![]() |
|||
|
|||
![]()
Dave
Try: =AVERAGE(INDIRECT("B" & A1 & ":" & "B20")) Where A1 contains the row number you wish to start at. Steve "feman007" wrote in message ... I'm wondering if there is a way to assign a range starting (or ending) cell location based on a variable number. For instance, say I have cells B1 through B20 and want to take an average, but not of the entire range. Say I only want to average B5:B20 but the "5" is given to me by a separate equation. Is there a way to write =AVERAGE(B???:B20) so that the ??? is referenced to another cell? That way I can cite a range based on a variable starting point. Thanks, Dave by the way, these newsgroups are awesome |
#4
![]() |
|||
|
|||
![]()
=AVERAGE(INDIRECT("B"&H1&":B20"))
-- HTH RP (remove nothere from the email address if mailing direct) "feman007" wrote in message ... I'm wondering if there is a way to assign a range starting (or ending) cell location based on a variable number. For instance, say I have cells B1 through B20 and want to take an average, but not of the entire range. Say I only want to average B5:B20 but the "5" is given to me by a separate equation. Is there a way to write =AVERAGE(B???:B20) so that the ??? is referenced to another cell? That way I can cite a range based on a variable starting point. Thanks, Dave by the way, these newsgroups are awesome |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I assign a range starting cell based on a variable locati. | Excel Discussion (Misc queries) | |||
How do I automatically hide columns in a worksheet based on a cell value? | Excel Worksheet Functions | |||
Adding contents of one cell to a range of cells. | Excel Worksheet Functions | |||
Formula to return cell contents based on multiple conditions | Excel Worksheet Functions | |||
make a cell empty based on condition | Charts and Charting in Excel |