Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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=528654

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Using Cell Variables to Specify Cell Range

you can use cells(n,"L") n is variable.

"jcottam" wrote:


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=528654


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Using Cell Variables to Specify Cell Range

Please don't multipost - You have a number of answers across different
groups now, and that really is frowned upon in these groups.

--
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=528654



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Using Cell Variables to Specify Cell Range

=SUM(COUNTIF(INDIRECT("DataWorkSheet!L$"&E4&":L$"& E5),$A16)/$B$10)

In your Worksheet you would set
where e4=15 and e5=30
You can also make any other part of the string a variable (i.e. DataWorkSheet)
Hope this is what you are looking for.
Felix


"jcottam" wrote:


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=528654


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
How can I make a blank cell in a formula cell with a range of cell Vi Excel Discussion (Misc queries) 5 June 21st 07 02:46 PM
Need Destination cell to ref origin cell, but w/ many variables..H Ms.shopalot Excel Worksheet Functions 4 May 4th 07 09:31 PM
Using Cell Variables to Specify Cell Range jcottam Excel Worksheet Functions 1 March 31st 06 07:33 PM
Passing cell addressess to variables to be use in range ExcelMonkey[_146_] Excel Programming 2 June 11th 04 09:31 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM


All times are GMT +1. The time now is 03:08 AM.

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

About Us

"It's about Microsoft Excel"