# Using IF statements to create totals where words are involved

1. ## Using IF statements to create totals where words are involved

I am creating a roster based around multiple employees working different swings and down the bottom I want a total for combined hours for the day which I will be then using to calculate daily income generated.

The roster however has different words depending on an employees stage. For example 10 people might be on week 1 of their swing (W1), 10 on week 2 (W2) and 10 on R&R (RR). Along with this we also have codes for Holidays, Local work etc.

I have read some articles on the "If" type formulas but only under stand the very basic 1 cell usage. I have attached a copy of an example roster so that it shows what I am talking about. Could someone please help me with the coding.

2. ## Re: Using IF statements to create totals where words are involved

You could put this formula in E20 and drag right

=SUMPRODUCT(COUNTIF(E\$3:E\$17,\$A\$25:\$A\$29), \$C\$25:\$C\$29)

3. ## Re: Using IF statements to create totals where words are involved

Originally Posted by mikerickson
You could put this formula in E20 and drag right

=SUMPRODUCT(COUNTIF(E\$3:E\$17,\$A\$25:\$A\$29), \$C\$25:\$C\$29)
Worked absolutely perfectly. Had to make some minor changes to the roster template to account for the values and it worked a treat. Thank you so much for the solution plus it taught me a little more about excel.

Cheers

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1