if or countif

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
735
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

AlphaFrog

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

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

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,487
Messages
5,831,980
Members
430,100
Latest member
namhnz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top