Forum

Notifications
Clear all

COUNTIFS issue

5 Posts
4 Users
0 Reactions
63 Views
(@louiseefoster)
Posts: 2
New Member
Topic starter
 

I am creating a holiday planner.  I want to total each row as follows:

 

If cell contains H count as 1

If cell contains HD count as 0.5

I'd really like to put thin into a single formula if that's possible. My spreadsheet is attached.

 

As a simple example if I have H in A1 and HD in B1 then I want C1 to show 1.5

 
Posted : 04/01/2019 7:50 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Louise

e.g. in cell AN12 you can write

=COUNTIF(C12:AM12,"H")+(COUNTIF(C12:AM12,"HD")/2)

Hope this helps.

Sunny

 
Posted : 04/01/2019 8:23 am
(@louiseefoster)
Posts: 2
New Member
Topic starter
 

Thanks so much Sunny - seems so simple now!! 🙂

Works perfectly

 
Posted : 04/01/2019 8:48 am
(@fravis)
Posts: 337
Reputable Member
 

You also have ´BH´ in some cells. Don´t they have to count as well?

Frans

 
Posted : 04/01/2019 3:48 pm
(@debaser)
Posts: 836
Member Moderator
 

Just for information (it's probably not worth it for only two combinations), you could also use a construction like this:

=SUM(COUNTIF(E4:AI4,{"H","HD"})/{1,2})

 
Posted : 08/01/2019 5:04 am
Share: