简体   繁体   中英

Count cells with certain text

for a little bit of context, I'm setting up a excel sheet for writing schedules for my work.

Currently it's set up like this: A1 = name, B1 = time (530-1030pm), C1 = amt of hours (5.00 in this case)

What I'm trying to do is count up any training shifts throughout the schedule, so I'm hoping that whoever is making the schedule can just put "/TR" at the end of the time (530-1030/TR) and at the bottom of the sheet, have it count up the hours for any shifts that have TR in them.

I know of COUNTIF, but that just counts up the # of cells that have 'tr' in it, I need to check if the cell has /tr in it, then get the hours from the next cell over, then count the total # of hours from all those cells.

If that makes sense :p

Thank you in advance.

You should use sumif. It's slmost the same as countif, but you can specify the range to check, the condition and finally the range to sum.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM