Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate Median with a macro
How do I set up a macro to calulate Medain? The median will be in in its own
column which is col K and the data will be cols c through J. Also the data could be off any size (could many records). Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate Median with a macro
Application.Median(Range("C1:J100"))
-- Regards, Tom Ogilvy "K McCurry" wrote in message ... How do I set up a macro to calulate Medain? The median will be in in its own column which is col K and the data will be cols c through J. Also the data could be off any size (could many records). Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate Median with a macro
Thanks for responding. How would use that command to calulate the median if
you did not know how many records would be in the file? The median will be in column M and the range I am using will be C - K. I would like to run a macro for this. Thanks. "Tom Ogilvy" wrote: Application.Median(Range("C1:J100")) -- Regards, Tom Ogilvy "K McCurry" wrote in message ... How do I set up a macro to calulate Medain? The median will be in in its own column which is col K and the data will be cols c through J. Also the data could be off any size (could many records). Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate Median with a macro
do you mean you want the meadian for the values in each row in columns C to
K, then entered in the corresponding cell in column M? Sub ComputeMedian() set rng = Range(cells(2,3),cells(rows.count,3).End(xlup) for each cell in rng cell.offset(0,10) = application.Median(cell.resize(1,9)) Next End Sub -- Regards, Tom Ogilvy "K McCurry" wrote in message ... Thanks for responding. How would use that command to calulate the median if you did not know how many records would be in the file? The median will be in column M and the range I am using will be C - K. I would like to run a macro for this. Thanks. "Tom Ogilvy" wrote: Application.Median(Range("C1:J100")) -- Regards, Tom Ogilvy "K McCurry" wrote in message ... How do I set up a macro to calulate Medain? The median will be in in its own column which is col K and the data will be cols c through J. Also the data could be off any size (could many records). Thanks. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate Median with a macro
Yes that would be correct. It would need to calculate the median for each
row in column M. I will give what you sent a try. Hope that helps. Thanks. "Tom Ogilvy" wrote: do you mean you want the meadian for the values in each row in columns C to K, then entered in the corresponding cell in column M? Sub ComputeMedian() set rng = Range(cells(2,3),cells(rows.count,3).End(xlup) for each cell in rng cell.offset(0,10) = application.Median(cell.resize(1,9)) Next End Sub -- Regards, Tom Ogilvy "K McCurry" wrote in message ... Thanks for responding. How would use that command to calulate the median if you did not know how many records would be in the file? The median will be in column M and the range I am using will be C - K. I would like to run a macro for this. Thanks. "Tom Ogilvy" wrote: Application.Median(Range("C1:J100")) -- Regards, Tom Ogilvy "K McCurry" wrote in message ... How do I set up a macro to calulate Medain? The median will be in in its own column which is col K and the data will be cols c through J. Also the data could be off any size (could many records). Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I calculate a weighted median? | Excel Worksheet Functions | |||
How do I calculate the median of a distribution? | Excel Discussion (Misc queries) | |||
Calculate MEDIAN of Last x Rows in a Column | Excel Worksheet Functions | |||
calculate a MEDIAN using multiple criteria? | Excel Worksheet Functions | |||
Calculate median for different groups | Excel Discussion (Misc queries) |