Solved

Wrong formula being used

Posted on 2013-05-19
5
259 Views
Last Modified: 2013-05-19
EE Pros,

I have a "Gap" column that represents the difference between two other columns.  Each Gap has a associated number, 1-5 that is related to one of 3 Categories -- MIX, TODAY, TOMORROW. If we fix one formula, I can fix all the rest.  The formula now uses index and match.  What I need it to do is Index, count the occurances (of each number assigned (i.e. 1-5) and create an average related to the indexed numbers divided by the occurances.  I don't think it does that now as you will see by my sample attached.  I think the formula must be different to get the right result.

Thank you in advance.

B.
INCORRECT-FORMULA.xlsm
0
Comment
Question by:Bright01
  • 2
  • 2
5 Comments
 
LVL 22

Expert Comment

by:Flyster
ID: 39179356
You can use a combination of sumif/countif. Try this formula in K4:

=SUMIF(F3:F27,I4,E3:E27)/COUNTIF(F3:F27,I4)

Copy and paste down to K8.

Flyster
0
 
LVL 81

Expert Comment

by:byundt
ID: 39179357
I don't understand why you think the average should be 0.9 for cell K4. There are three instances of a "1" in column F. The corresponding values from column C are 2.4, 2.0 and 1.6. The average of those is 2.0.

This formula returns it (and may be copied across and down):
=AVERAGEIF($F$3:$F$27,$I4,C$3:C$27)
0
 
LVL 22

Assisted Solution

by:Flyster
Flyster earned 250 total points
ID: 39179429
Slight correction here. If you use this formula, it needs these absolute references:

=SUMIF($F$3:$F$27,I4,$E$3:$E$27)/COUNTIF($F$3:$F$27,I4)

(K4 formula)
0
 
LVL 81

Accepted Solution

by:
byundt earned 250 total points
ID: 39179437
Formulas corrected as previously suggested.
INCORRECT-FORMULAQ28132662.xlsm
0
 

Author Closing Comment

by:Bright01
ID: 39179927
Great work guys.  I think both formulas do the job but Byundt's formula is shorter.

Good teamwork.....and thank you.  BTW; Byundt was correct on my mock up...... I had the wrong column identified!  Good catch.... you gave me a great answer anyway.

B.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

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

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

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now