Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Averaging adjacent Columns
Hi I have data in the following column format: X Y X1 Y1 X3 Y3 ............ Average 1 3 5 2 34 2 0 4 . . . . . . There are many columns (X,Y,X1,Y1 ....) with numerical data in them. I want to create two new column by name "Average X" & "Average Y". Column "Average X" is the average of the X, X1 X2 X3.. columns. Column "Average Y" is the average of the Y, Y1 Y2 Y3.. columns etc. How do I write a macro to do this automatically. Please help. Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Averaging adjacent Columns
You don't need VBA. You can use an array formula similar to:
=AVERAGE(IF(LEFT(A$1:Z$1, 1)="X", B2:I2)) "Srikanth Ganesan" wrote: Hi I have data in the following column format: X Y X1 Y1 X3 Y3 ............ Average 1 3 5 2 34 2 0 4 . . . . . . There are many columns (X,Y,X1,Y1 ....) with numerical data in them. I want to create two new column by name "Average X" & "Average Y". Column "Average X" is the average of the X, X1 X2 X3.. columns. Column "Average Y" is the average of the Y, Y1 Y2 Y3.. columns etc. How do I write a macro to do this automatically. Please help. Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Averaging adjacent Columns
Sorry...=AVERAGE(IF(LEFT(A$1:Z$1, 1)="X", A2:Z2))
"Jim Thomlinson" wrote: You don't need VBA. You can use an array formula similar to: =AVERAGE(IF(LEFT(A$1:Z$1, 1)="X", B2:I2)) "Srikanth Ganesan" wrote: Hi I have data in the following column format: X Y X1 Y1 X3 Y3 ............ Average 1 3 5 2 34 2 0 4 . . . . . . There are many columns (X,Y,X1,Y1 ....) with numerical data in them. I want to create two new column by name "Average X" & "Average Y". Column "Average X" is the average of the X, X1 X2 X3.. columns. Column "Average Y" is the average of the Y, Y1 Y2 Y3.. columns etc. How do I write a macro to do this automatically. Please help. Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Averaging adjacent Columns
Jim, It does not seem to work. Please help. Thanks Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
averaging data in multiple columns | Excel Discussion (Misc queries) | |||
Add cells on two adjacent rows but non-adjacent columns | Excel Worksheet Functions | |||
averaging info from three columns | Excel Discussion (Misc queries) | |||
Averaging Columns based on a Text String | New Users to Excel | |||
Averaging columns | New Users to Excel |