![]() |
To find Average
Hello-
There is a requirement in my project to find the average of values in a sheet. Values starts from A1 and goes till G20 (which keeps changing every month). For each row we have to find the Average. For example; A B C D -- -- -- -- 10 20 10 40 30 40 20 50 50 60 30 60 For Row 'A' we have to find the Average, similarly for 'B','C' and 'D'. Instead of doing manually is there any code to perform this task by writing a macro. Please let me know if you need any further details. Regards, Murali. G |
To find Average
Yes, it is easier to write a function as you suggested. But as i said the
data keeps increasing, instead of writing a formula every month it is better to write a macro which calculates the average every time by clicking a button. Please help. Regards, Murali. G "Sam Wilson" wrote: Is it not quicker to use =AVERAGE(A1:A20) in cell A21 etc than to write a macro? "Murali G" wrote: Hello- There is a requirement in my project to find the average of values in a sheet. Values starts from A1 and goes till G20 (which keeps changing every month). For each row we have to find the Average. For example; A B C D -- -- -- -- 10 20 10 40 30 40 20 50 50 60 30 60 For Row 'A' we have to find the Average, similarly for 'B','C' and 'D'. Instead of doing manually is there any code to perform this task by writing a macro. Please let me know if you need any further details. Regards, Murali. G |
To find Average
why don't you put the avarage function into column A?
so A1:= =AVERAGE(B1:X1") it will return the average where there are numbers and ignores nulls "Murali G" wrote in message ... Yes, it is easier to write a function as you suggested. But as i said the data keeps increasing, instead of writing a formula every month it is better to write a macro which calculates the average every time by clicking a button. Please help. Regards, Murali. G "Sam Wilson" wrote: Is it not quicker to use =AVERAGE(A1:A20) in cell A21 etc than to write a macro? "Murali G" wrote: Hello- There is a requirement in my project to find the average of values in a sheet. Values starts from A1 and goes till G20 (which keeps changing every month). For each row we have to find the Average. For example; A B C D -- -- -- -- 10 20 10 40 30 40 20 50 50 60 30 60 For Row 'A' we have to find the Average, similarly for 'B','C' and 'D'. Instead of doing manually is there any code to perform this task by writing a macro. Please let me know if you need any further details. Regards, Murali. G |
All times are GMT +1. The time now is 11:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com