Averaging specific data in columns

  • Thread starter Thread starter DLS
  • Start date Start date
D

DLS

I have a spreadsheet with many columns of data. Two of the columns are
important for this question. For simplicity, say that column 1 lists red
cars and blue cars and column 2 lists the sale price of them. I want to
perform AVG,MIN,MAX and MEDIAN of the sale price of just the red cars. I
tried Daverage but couldn't get it to work. Can someone help me with
this situation? Any help will be appreciated.

DLS
 
introduce a row for headings at the top if necessary ---color ---- price
suppose the data with the headings are C1 to D9(C colum color and d column
price)
place a criteria range somewhere for e.g. g1 to H2 following
color price
blue

now in some empty cell type

=DAVERAGE(C1:D9,"price",G1:H2)
see this empty cell is NOT already formatted as text. (I had this problem
while testing). it should be in general format. preferably in number
format.
hope you get what you want
you can try dmax, dmin, dsum etc

perhaps some easier solution may also be available
 
R.VENKATARAMAN
Thanks for your help. That cleared up the problem and all is working
now.

DLS
 
Can you tell me why when I do a DMAX on a set of data to get the average
of 1 story bldgs in the range I get one answer and when I do a MAX on
the 1 story bldgs of the data, but in a separate column just to check
the accuracy of the first, I get another answer. I have checked and have
no transposition errors.
 
Everyone, please forget my last post, I found the problem. But now, I
have the following:

Of the three formulas below DMIN and DMAX work correctly in that when
the search in H1:R51 contains no '2 story homes', the result is a blank
cell, but DAVERAGE gives a result of #DIV/0! . Can anyone tell me why
this is so?

=IF(DMIN(Summary!H1:R51,"list
Price",A1:B2)=0,"",(DMIN(Summary!H1:R51,"list Price",A1:B2)))

=IF(DAVERAGE(Summary!H1:R51,"list
Price",A1:B2)=0,"",(DAVERAGE(Summary!H1:R51,"list Price",A1:B2)))

=IF(DMAX(Summary!H1:R51,"list
Price",A1:B2)=0,"",(DMAX(Summary!H1:R51,"list Price",A1:B2)))

DLS
 

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

Back
Top