Average of cells from a table given certain criteria

A

Angus Beaumont

Hi,

I have a table with prices in on a worksheet called "do not amend" the
table is named by the range "channels" and column A has channel names
and along the top are months (in format Mmm) data in the center are
the prices.

On the main sheet I want to pull in an average of the prices into
column C based on a vlookup of channels in column A and also a start
month and end month which are in cells H4 & H5.

In other words cell H4 has a value of Jan H5 a value of Apr
In column C I want the average of the prices between jan and Apr for
the corresponding channel in column A.

What I am currently doing is just pulling through a single months
prices based on the value of the start month H4 using (VLOOKUP(A10,'Do
not amend'!$A$1:$N$105,(VLOOKUP($H$4,'Do not amend'!$R$2:$S
$13,2,FALSE)),FALSE) R2:S13 is a reference table for months that
I use to select the column to pull back in the Vlookup based on the
month value in H4. of course what I now want to do is pull back the
average of prices between two months in H4 & H5

hope that makes sense and thank you
 
D

Don Guillett

Hi,

I have a table with prices in on a worksheet called "do not amend" the
table is named by the range "channels" and column A has channel names
and along the top are months (in format Mmm) data in the center are
the prices.

On the main sheet I want to pull in an average of the prices into
column C based on a vlookup of channels in column A and also a start
month and end month which are in cells H4 & H5.

In other words cell H4 has a value of Jan H5 a value of Apr
In column C I want the average of the prices between jan and Apr for
the corresponding channel in column A.

What I am currently doing is just pulling through a single months
prices based on the value of the start month H4 using (VLOOKUP(A10,'Do
not amend'!$A$1:$N$105,(VLOOKUP($H$4,'Do not amend'!$R$2:$S
$13,2,FALSE)),FALSE) R2:S13 is a reference table for months that
I use to select the column to pull back in the Vlookup based on the
month value in H4. of course what I now want to do is pull back the
average of prices between two months in H4 & H5

hope that makes sense and thank you



Hi,

I have a table with prices in on a worksheet called "do not amend" the
table is named by the range "channels" and column A has channel names
and along the top are months (in format Mmm) data in the center are
the prices.

On the main sheet I want to pull in an average of the prices into
column C based on a vlookup of channels in column A and also a start
month and end month which are in cells H4 & H5.

In other words cell H4 has a value of Jan H5 a value of Apr
In column C I want the average of the prices between jan and Apr for
the corresponding channel in column A.

What I am currently doing is just pulling through a single months
prices based on the value of the start month H4 using (VLOOKUP(A10,'Do
not amend'!$A$1:$N$105,(VLOOKUP($H$4,'Do not amend'!$R$2:$S
$13,2,FALSE)),FALSE) R2:S13 is a reference table for months that
I use to select the column to pull back in the Vlookup based on the
month value in H4. of course what I now want to do is pull back the
average of prices between two months in H4 & H5

hope that makes sense and thank you

s"If desired, send your file to dguillett1 @gmail.com I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."
 
A

Angus Beaumont

s"If desired, send your file to dguillett1  @gmail.com I will only lookif:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."

thanks have fixed now using array formula
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top