Counting the frequency of a value used in a formula

FayeWray

New Member
Joined
Aug 21, 2018
Messages
1
Hi all,

I'm trying to calculate the frequency a value is used in a formula. I have a range of results (ranging numerically from 1-9) each connected to a topic/subject. I have created a cell which identifies the largest number amongst those results in every row (=LARGE(S5:AN5,{1{)).

What i'm trying to calculate is the frequency of which particular topics/subjects are identified as the largest.

e.g. in row 5, '9' is identified as the highest value. This is under the subject 'Computing'. In row 6, '8' is identified as the largest number and this is under the subject 'History'. What i'd like to know is how frequently 'History' or 'Computing' is identified as the largest value in the set of results.

HistoryBiologyComputingMathsGeographyArtHIGHEST
567799
4564446

<tbody>
</tbody>

So I want a table like:

History0
Biology0
Computing1
Maths0
Geography0
Art1

<tbody>
</tbody>

Any advice about formulas etc would be appreciated.

Thanks!
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
8,965
Welcome to the MrExcel forum.

Try:

ABCDEFGHIJKL
1HistoryBiologyComputingMathsGeographyArtHIGHESTSubjectPicked largest
2History1
31234324Biology0
44564446Computing1
55267799Maths3
68432578Geography0
78319399Art2
84368458
9

<tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
K2=SUMPRODUCT(--(INDEX($A$2:$F$10,0,MATCH(J2,$A$1:$F$1,0))=$G$2:$G$10),--($G$2:$G$10<>""))

<tbody>
</tbody>

<tbody>
</tbody>




Change your ranges to match. Note that if there's a tie, like on row 7 here with Maths and Art, both will be counted.
 

Forum statistics

Threads
1,081,576
Messages
5,359,729
Members
400,545
Latest member
Damntheman30

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top