Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
I need a macro
I would like a macro to do the following:
I would place the the cursor in any cell and this macro would give me the average of all the entries to the left if the selected cell. EX: I place the cursor in cell M12. I want this macro on display in cell M12 the average of all the values from Col C12 to Col L12. Note that there may NOT be entries in all the cells in that range. Also the start point would always be col C .Thanks |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
I need a macro
You can do this easily with a worksheet_selection event in the sheet module
but you would probably want to restrict to a certain range or columns and rows or it would fire EACH time you select ANY cell. Never less than col C and never more than column _____? rows________? -- Don Guillett Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... I would like a macro to do the following: I would place the the cursor in any cell and this macro would give me the average of all the entries to the left if the selected cell. EX: I place the cursor in cell M12. I want this macro on display in cell M12 the average of all the values from Col C12 to Col L12. Note that there may NOT be entries in all the cells in that range. Also the start point would always be col C .Thanks |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
I need a macro
Thanks for thr quick reply....BUT can you please tell me HOW to accomplish
that! Thanks "Don Guillett" wrote: You can do this easily with a worksheet_selection event in the sheet module but you would probably want to restrict to a certain range or columns and rows or it would fire EACH time you select ANY cell. Never less than col C and never more than column _____? rows________? -- Don Guillett Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... I would like a macro to do the following: I would place the the cursor in any cell and this macro would give me the average of all the entries to the left if the selected cell. EX: I place the cursor in cell M12. I want this macro on display in cell M12 the average of all the values from Col C12 to Col L12. Note that there may NOT be entries in all the cells in that range. Also the start point would always be col C .Thanks |
#5
Posted to microsoft.public.excel.newusers
|
|||
|
|||
I need a macro
it could be asked for from any col past M but always starting at col C
thanks "Don Guillett" wrote: Let's see, you didn't answer my questions, did you? -- Don Guillett Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... Thanks for thr quick reply....BUT can you please tell me HOW to accomplish that! Thanks "Don Guillett" wrote: You can do this easily with a worksheet_selection event in the sheet module but you would probably want to restrict to a certain range or columns and rows or it would fire EACH time you select ANY cell. Never less than col C and never more than column _____? rows________? -- Don Guillett Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... I would like a macro to do the following: I would place the the cursor in any cell and this macro would give me the average of all the entries to the left if the selected cell. EX: I place the cursor in cell M12. I want this macro on display in cell M12 the average of all the values from Col C12 to Col L12. Note that there may NOT be entries in all the cells in that range. Also the start point would always be col C .Thanks |
#6
Posted to microsoft.public.excel.newusers
|
|||
|
|||
I need a macro
Right click sheet tabview codeinsert thisadjust columns/rowsSAVE
workbook. Now if you select a cell within the allowed area you will get your average. Please note that you will have difficulty putting info into the cells so you may want to comment out the macro to do that. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row <12 Or Target.Row 25 _ Or Target.Column < 3 Or Target.Column 14 Then Exit Sub tr = Target.Row tc = Target.Column - 1 MsgBox Application.Average(Range(Cells(tr, 3), Cells(tr, tc))) End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... I would like a macro to do the following: I would place the the cursor in any cell and this macro would give me the average of all the entries to the left if the selected cell. EX: I place the cursor in cell M12. I want this macro on display in cell M12 the average of all the values from Col C12 to Col L12. Note that there may NOT be entries in all the cells in that range. Also the start point would always be col C .Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |