Conditional Statement to Compute Average

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to calculate the average of a list of numbers only if another
field in the same row contains a specific character? I have a spreadsheet
that contains lines of data with dollar values in one field and either an "M"
or an "R" in another field. I want to calculate the average dollar value for
only those lines that have a corresponding "M" in them.
 
Is there a way to calculate the average of a list of numbers only if another
field in the same row contains a specific character? I have a spreadsheet
that contains lines of data with dollar values in one field and either an "M"
or an "R" in another field. I want to calculate the average dollar value for
only those lines that have a corresponding "M" in them.

$ values in B, M/R in A

=SUMIF(A:A,"M",B:B)/COUNTIF(A:A,"M")

HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 

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