Using an if statement to count if a letter is in a range of cells

Gummyworms1234

New Member
Joined
Jul 18, 2019
Messages
28
I am tracking tardies for employees and I need help. I want to use an if statement to locate cells in a range that contain the letter t. If the cells in the range contain the letter t, I want the value 0.5 to return. The current formula I have tried is =if(B2:G2 = "t", 0.5, "") but it doesn't give me the result I need. I have attached a screenshot of what I am doing. Thanks for the help.
 

Attachments

  • tardies.PNG
    tardies.PNG
    9.3 KB · Views: 4

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Do you want to return 0.5 if there is a t in the range, or do you want 1.5 if there were 3 of them?
 
Upvote 0
Do you want to return 0.5 if there is a t in the range, or do you want 1.5 if there were 3 of them?
I want a 1.5 if there were 3 of them and the number would automatically increase by 0.5 for every t in the range. So if I counted 7 of them in the month for example, I would want the total number of tardies to equal 3.5
 
Upvote 0
In that case how about
Excel Formula:
=COUNTIF(B2:G2,"t")*0.5
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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
Back
Top