Solola
Board Regular
- Joined
- Sep 23, 2003
- Messages
- 73
I use the subtotals function profusely. However, I want to use functions that are not available in the subtotals function. For example, I want to generate a median for a range of numbers that are subtotaled by Center Number, but the median function is not available when I subtotal.
What I have been doing is generating any random subtotal to get my breakout by Center: At Each Change in Center Number, Use Function Count, Add subtotal to Center Number. Then, once my subtotals have been created, I manually add the median function on EACH newly created subtotal line. This gets very cumbersome, b/c I have over 100 Center Numbers, so I have to add the median function that over 100 times. I've tried running a macro to do it for me, but I can't get it to pull the correct range, since each subtotal is totalling a different number of rows (I'm not that adept at macros).
Macros aside, what I REALLY want to do is figure out a way to use the Go To function, select visible cells, and paste a formula into each subtotal line. I have no problem doing this in and of itself (if it were a simple formula), but I DO have difficulty pulling the correct range into each subtotal line for the median. How do I copy ONLY the range used in the count function into my median function? I've tried telling Excel to =find() the comma in the subtotal so I can use it in a =mid() formula and return the range, but it's looking for the comma in the value, not the formula, so that doesn't work.
So, my goal is to pull the range from one formula (only a portion of the original formula) into another formula and Control-Enter (copy) that into all selected cells (using each line's own range, rather than copying the range from the first cell into all of them).
Any ideas?
What I have been doing is generating any random subtotal to get my breakout by Center: At Each Change in Center Number, Use Function Count, Add subtotal to Center Number. Then, once my subtotals have been created, I manually add the median function on EACH newly created subtotal line. This gets very cumbersome, b/c I have over 100 Center Numbers, so I have to add the median function that over 100 times. I've tried running a macro to do it for me, but I can't get it to pull the correct range, since each subtotal is totalling a different number of rows (I'm not that adept at macros).
Macros aside, what I REALLY want to do is figure out a way to use the Go To function, select visible cells, and paste a formula into each subtotal line. I have no problem doing this in and of itself (if it were a simple formula), but I DO have difficulty pulling the correct range into each subtotal line for the median. How do I copy ONLY the range used in the count function into my median function? I've tried telling Excel to =find() the comma in the subtotal so I can use it in a =mid() formula and return the range, but it's looking for the comma in the value, not the formula, so that doesn't work.
So, my goal is to pull the range from one formula (only a portion of the original formula) into another formula and Control-Enter (copy) that into all selected cells (using each line's own range, rather than copying the range from the first cell into all of them).
Any ideas?