if or countif

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
599
Currently have

=IF(OR(A3="A",A3<6),COUNTIF(G3:N3,a3)*2,0)

which calculates the number of times A or a number less than 6 appears in the range G3:N3

What i need though is if appears more than once the 1st time it is multiplied by 2 and 2nd time multiplied by 1

i.e. if A appears twice in G3:N3 it will score 3 2 for the 1st time and 1 for the second time

Thanks
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,276
Try this...

=IF(OR(A3="A",A3<6),COUNTIF(G3:N3,A3)+(COUNTIF(G3:N3,A3)>0),0)
 

Watch MrExcel Video

Forum statistics

Threads
1,108,924
Messages
5,525,656
Members
409,658
Latest member
Yardcell

This Week's Hot Topics

Top