#### lil_ash_xxx

##### New Member
First of All...... Hi All

I was hoping someone could help me with the below formula, I'm pretty sure It is quite straight forward I just cant seam to get it to work!

I basically want a total for a range of cells if H = 1 and HH = 0.5

This is what I'm trying at present but Excel isnt liking

=sumif(d10:ah10,"H",1,"HH",0.5)

### Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

#### GlennUK

##### Well-known Member
but Excel isnt liking
... and me neither.

Explain what you mean by H=1 and HH=0.5? You can't mean column HH 'cos the range being tested in the sumif only goes up to AH ... so what do you actually mean?

#### lil_ash_xxx

##### New Member
what I mean is if H is entered within the cell range I want excel to count it as a 1 and if HH is entered to count it as 0.5

so if 6 H's and 1 HH was entered the formula would read 6.5

hopefully that will make sence!

#### GlennUK

##### Well-known Member
=COUNTIF(d10:ah10,"H")+COUNTIF(d10:ah10,"HH")/2

#### Richard Schollar

##### MrExcel MVP
Hi

Try this:

=SUM(COUNTIF(D10:AH10,{"H","HH"})*{1,0.5})

Best regards

Richard

#### lil_ash_xxx

##### New Member
Brilliant Cheers Glenn - Much appreciated

Replies
7
Views
231
Replies
14
Views
344
Replies
6
Views
234
Replies
2
Views
583
Replies
2
Views
211

1,141,626
Messages
5,707,491
Members
421,511
Latest member
mgroah1

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

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