ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using Cell Variables to Specify Cell Range (https://www.excelbanter.com/excel-worksheet-functions/80863-using-cell-variables-specify-cell-range.html)

jcottam

Using Cell Variables to Specify Cell Range
 

Hi There,

I'm looking to make a worksheet as dynamic as possible.

I want to define a range of ROWS (rows 15 - 30) in table cells (ex: A1=
15 , A2= 30)

I then want to reference these definitions in a formula like the one
below:

=SUM(COUNTIF(DataWorkSheet!L$*15*:L$*30*,$A16)/$B$10)

Unfortunately I don't know how to reference variables "15" and "30" to
make the formula above dynamic. My dream is to input row numbers
(range) into cells A1 and A2 and then reference the "VALUES" of these
cells in the formula above. Basically, I don't want to hard code "15"
and "30" into the formula above.

Any suggestions? Thanks!


--
jcottam
------------------------------------------------------------------------
jcottam's Profile: http://www.excelforum.com/member.php...o&userid=33049
View this thread: http://www.excelforum.com/showthread...hreadid=528653


Ken Wright

Using Cell Variables to Specify Cell Range
 
Try taking a look at INDIRECT for building a reference from a string, or
perhaps OFFSET to build a range from values in a cell.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------


"jcottam" wrote in
message ...

Hi There,

I'm looking to make a worksheet as dynamic as possible.

I want to define a range of ROWS (rows 15 - 30) in table cells (ex: A1=
15 , A2= 30)

I then want to reference these definitions in a formula like the one
below:

=SUM(COUNTIF(DataWorkSheet!L$*15*:L$*30*,$A16)/$B$10)

Unfortunately I don't know how to reference variables "15" and "30" to
make the formula above dynamic. My dream is to input row numbers
(range) into cells A1 and A2 and then reference the "VALUES" of these
cells in the formula above. Basically, I don't want to hard code "15"
and "30" into the formula above.

Any suggestions? Thanks!


--
jcottam
------------------------------------------------------------------------
jcottam's Profile:
http://www.excelforum.com/member.php...o&userid=33049
View this thread: http://www.excelforum.com/showthread...hreadid=528653





All times are GMT +1. The time now is 08:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com