# MS Excel 97

#### service

##### New Member

I have a spreadsheet and on the front summary sheet I have already set up the spreadsheet to count the Y in the columns I require.

However, the complication is that I only want it to count the Medium and Low risks sites, which are highlighted in another column but not the High risk sites.

can anyone help
thanks

### Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

#### GlennUK

##### Well-known Member
How are the Medium and Low risks sites highlighted exactly? Where are the Y's that need counting. It's hard to envisage your layout from your request.

#### patrickmuldoon99

##### Active Member
=SUMIF(A1:A3,"medium",B1:B3)+SUMIF(A1:A3,"low",B1:B3)

This presumes you have the list of 'medium', 'high' or 'low' in the range A1:A3, with the corresponding values in B1:B3

Change the ranges to suit

Hope this helps, though I believe you could posisbly write a more elegant formula than this.

#### patrickmuldoon99

##### Active Member
Edit:

A simpler formula for you:

=SUMIF(A1:A3,"<>high",B1:B3)

#### service

##### New Member

In columns C D E F G I have the following info.

High y y n n
High y y y y
Medium y n n n
Low y n n n

I only want to count the Medium and Low Y

#### patrickmuldoon99

##### Active Member
The only solution I can offer you is this:

In column H, place the formula

Code:
=IF(C10<>"High",COUNTIF(D10:G10,"y"),0)

copy it down, and then sum that range to give you the Medium and Low total y's.

hope this helps

#### GlennUK

##### Well-known Member

Code:
=SUMPRODUCT((C1:C14="Medium")*(D1:G14="y"))+SUMPRODUCT((C1:C14="Low")*(D1:G14="y"))

#### service

##### New Member
MS Excel

the formula worked great

many thanks for all your help

my pleasure

Replies
3
Views
185
Replies
3
Views
338
Replies
2
Views
110
Replies
10
Views
190
Replies
16
Views
142

1,136,928
Messages
5,678,623
Members
419,776
Latest member
mikelowski

### 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.

### Which adblocker are you using?

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

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