Solved

# excel 2007 help

Posted on 2011-05-06
Medium Priority
368 Views
Is there a way to average a cell if the cell above it has a crertain value??

So if row b1 through b5 has percentages in it I want to add the cell and then give an average if in the row above the data has an S in it.

A1 = S  A2 = B A3 = S A4 = S A5 = B
B1 = 2 B2 = 2 B3 = 7 B4 =9 B5 = 6

Add B1+B3+B5 then average them.  Total would change as the values in A change.
0
Question by:Curtis Long
• 2

LVL 43

Expert Comment

ID: 35710970
Something is not clear here. Why did you select B1, B3 and B5? They dont have an S in their row, nor in the row above for all.
0

LVL 33

Accepted Solution

PowerEdgeTech earned 1000 total points
ID: 35710976
I agree, but does the attached do what you are after?  It simply creates another (hidden) column that captures your cells based on your criteria of one column having an S.  If not, I'm afraid I misunderstood what you're looking for :)
Book1.xlsx
0

LVL 43

Assisted Solution

Saqib Husain, Syed earned 1000 total points
ID: 35711288
If PowerEdgeTech has understood you correctly you do not need a helper column. You can simply use the formulas

=SUMIF(A1:A5,"S",B1:B5)

=SUMIF(A1:A5,"S",B1:B5)/COUNTIF(A1:A5,"S")
0

Author Closing Comment

ID: 35712226
Thank you!!

Perfect!!  :-)
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
###### Suggested Courses
Course of the Month13 days, 23 hours left to enroll

#### 807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.