jakester
Feb 5, 2013, 09:06 AM
Hi Jerry - been a long time, hope life is treating you well.
Ok, so here is my problem. Every month I run a report that gives me a count of errors for different error codes. What I do is rank the top 5 error codes according to their counts. The error codes are like H10012 or H20631, etc. Every once in a while, though, different error codes will have the same the number of errors. The Large function simply repeats the first error code if it has the same number of errors as another code.
Here's an example of the data
H10012 20
H10021 15
H20631 20
H30513 45
H40512 35
The codes are all in Column A and the counts can be in Columns B - M (Jan - Dec), depending upon the month that I am looking for (each month is in a different column). I'd rather avoid trying to use helper columns because I constantly change the number of columns and that would require a lot of work.
Right now I am doing this in two stages. First, find the largest 5 values:
=LARGE(M:M,1) In this case, looking in Column M (Dec) and find the largest value. Second:
=INDEX(A:A,MATCH(LARGE(M:M,1),M:M,0)) Return the corresponding error code associated with the largest value in Column M.
Again, I look for the top 5 largest values. And in the above list, I'd like to have the sequence be:
H10021 15
H10012 20
H20631 20
H40512 35
H30513 45
But when I try to solve for this problem using Large, H10012 gets repeated twice because 20 appears twice. I found this formula out on the internet but I cannot get it to work properly. Probably because my pivot table doesn't start on row 1; the first error code starts on row A6:
=INDEX(A:A,MATCH(LARGE(D$1:D$500+(ROW(D$1:D$500)*0 .0000000001),ROW(1:1)),D$1:D$500+(ROW(D$1:D$500)*0 .0000000001),0))
Any ideas?
Ok, so here is my problem. Every month I run a report that gives me a count of errors for different error codes. What I do is rank the top 5 error codes according to their counts. The error codes are like H10012 or H20631, etc. Every once in a while, though, different error codes will have the same the number of errors. The Large function simply repeats the first error code if it has the same number of errors as another code.
Here's an example of the data
H10012 20
H10021 15
H20631 20
H30513 45
H40512 35
The codes are all in Column A and the counts can be in Columns B - M (Jan - Dec), depending upon the month that I am looking for (each month is in a different column). I'd rather avoid trying to use helper columns because I constantly change the number of columns and that would require a lot of work.
Right now I am doing this in two stages. First, find the largest 5 values:
=LARGE(M:M,1) In this case, looking in Column M (Dec) and find the largest value. Second:
=INDEX(A:A,MATCH(LARGE(M:M,1),M:M,0)) Return the corresponding error code associated with the largest value in Column M.
Again, I look for the top 5 largest values. And in the above list, I'd like to have the sequence be:
H10021 15
H10012 20
H20631 20
H40512 35
H30513 45
But when I try to solve for this problem using Large, H10012 gets repeated twice because 20 appears twice. I found this formula out on the internet but I cannot get it to work properly. Probably because my pivot table doesn't start on row 1; the first error code starts on row A6:
=INDEX(A:A,MATCH(LARGE(D$1:D$500+(ROW(D$1:D$500)*0 .0000000001),ROW(1:1)),D$1:D$500+(ROW(D$1:D$500)*0 .0000000001),0))
Any ideas?