Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ned
 
Posts: n/a
Default Furmula Dependent Cell References

I have a spreadsheet of a few hundred stocks with each stock in a row, from 5
through 600. Each column is a variable (price, EPS, Market Cap, etc) . I
would like to group these stocks by a variety of these variables and then
perform some calculations on the stocks in each group. I have macros to
group and hide, but I would like a furmula that changes cell references
depending on how many are in each group. The problem is that the number of
stocks that fit a certain screen will change all the time so formulas that
reference to specific rows will miss certain stocks. How do I create a
formula ie =median(c5:C600) that only counts the filtered stocks - could be
=median(C5:C140) or =median(C5:C88) depending on how many stocks fit the
screen? I have a cell that tells me the number of rows that fit the filter
so I will always know how many rows to count and what the starting row is
(those numbers are in cells) but how do I get the number that is in a cell to
enter into a cell reference? ie my filter result shows 45 stocks so I would
want to take =median(C5:C49) where the 49 is determined from an active cell?
  #2   Report Post  
Posted to microsoft.public.excel.misc
galimi
 
Posts: n/a
Default Furmula Dependent Cell References

Ned,

You could use the offset function.
=MEDIAN(OFFSET(c5,0,0,numRows,1))

Replace numRows with the formula you are using to calculate the number of
rows in your grouping.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"ned" wrote:

I have a spreadsheet of a few hundred stocks with each stock in a row, from 5
through 600. Each column is a variable (price, EPS, Market Cap, etc) . I
would like to group these stocks by a variety of these variables and then
perform some calculations on the stocks in each group. I have macros to
group and hide, but I would like a furmula that changes cell references
depending on how many are in each group. The problem is that the number of
stocks that fit a certain screen will change all the time so formulas that
reference to specific rows will miss certain stocks. How do I create a
formula ie =median(c5:C600) that only counts the filtered stocks - could be
=median(C5:C140) or =median(C5:C88) depending on how many stocks fit the
screen? I have a cell that tells me the number of rows that fit the filter
so I will always know how many rows to count and what the starting row is
(those numbers are in cells) but how do I get the number that is in a cell to
enter into a cell reference? ie my filter result shows 45 stocks so I would
want to take =median(C5:C49) where the 49 is determined from an active cell?

  #3   Report Post  
Posted to microsoft.public.excel.misc
ned
 
Posts: n/a
Default Furmula Dependent Cell References

Excelent! Thanks for the help.

"galimi" wrote:

Ned,

You could use the offset function.
=MEDIAN(OFFSET(c5,0,0,numRows,1))

Replace numRows with the formula you are using to calculate the number of
rows in your grouping.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"ned" wrote:

I have a spreadsheet of a few hundred stocks with each stock in a row, from 5
through 600. Each column is a variable (price, EPS, Market Cap, etc) . I
would like to group these stocks by a variety of these variables and then
perform some calculations on the stocks in each group. I have macros to
group and hide, but I would like a furmula that changes cell references
depending on how many are in each group. The problem is that the number of
stocks that fit a certain screen will change all the time so formulas that
reference to specific rows will miss certain stocks. How do I create a
formula ie =median(c5:C600) that only counts the filtered stocks - could be
=median(C5:C140) or =median(C5:C88) depending on how many stocks fit the
screen? I have a cell that tells me the number of rows that fit the filter
so I will always know how many rows to count and what the starting row is
(those numbers are in cells) but how do I get the number that is in a cell to
enter into a cell reference? ie my filter result shows 45 stocks so I would
want to take =median(C5:C49) where the 49 is determined from an active cell?

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
Excel insits that I use absolute cell references Espen Excel Discussion (Misc queries) 6 January 5th 17 05:47 AM
Automatically Changing Cell Reference's when Pasting in Excel No I'm Spartacus Excel Discussion (Misc queries) 0 February 13th 06 01:01 PM
Sumif function with remote cell references hennis Excel Worksheet Functions 1 August 12th 05 01:54 AM
Cell references change when entering new data [email protected] New Users to Excel 2 May 6th 05 07:48 PM
Absolute cell references and subsequent problems. Pank Mehta Excel Discussion (Misc queries) 2 April 19th 05 11:38 AM


All times are GMT +1. The time now is 07:47 PM.

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"