Use one column to identify values in adjacent column.
I would like to average 6 sets of columns. Each set has
one descriptive and one value column. ex: A3=5 B3=12%, C8=5 D8=21%, E14=5 F14=9%, etc. I want to ID all the columns with 5, but average their percentage. I dont want to re-sort each list so that all fives and values are on the same row. How do I write the formula? Thanks, Ken F. |
Use one column to identify values in adjacent column.
I'm not a real expert so someone may have a more elegant
solution but I had to do something like this beore. Write a macro which loops through all the cells in your range and use a distinct variable to accumulate all the values in each column using an IF statement (ie. IF celColA=5 then sumColB= sumColB + value in B). If there are different numbers of percentages you may have to add a variable to count up the number of cells to compute your average. Remember you have to initilize your variables to = 0 before you start. Hope this helps. Jack -----Original Message----- I would like to average 6 sets of columns. Each set has one descriptive and one value column. ex: A3=5 B3=12%, C8=5 D8=21%, E14=5 F14=9%, etc. I want to ID all the columns with 5, but average their percentage. I dont want to re-sort each list so that all fives and values are on the same row. How do I write the formula? Thanks, Ken F. . |
All times are GMT +1. The time now is 06:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com