Hi,
This formula might work for you:
this should be in cell C25 and it is an array formula, so you should enter it by pressing shift+ctrl+enter. After that, there should appear {}'s around the formula.
The first part of the formula, NOT(ISERROR(FIND(LOWER(LEFT(A25,4)),LOWER(PO1WEEK))), uses FIND-function to find the 4 first letters of the worker's name in A25 from the area of PO1WEEK. If it does, it returns a number, but if it doesn't, it returns an error. With NOT and ISERROR formulas these values are converted to TRUE's and FALSE's and because this is an array formula, the result is something like {TRUE, FALSE, TRUE, FALSE}.
The second part, IF(ISERROR(FIND("/",LOWER(PO1WEEK))),1,0.5), tries to find the / symbol from the searched area. If / is found, the IF return's 0.5, other wise it returns 1. So the result is something like {1, 1, 0.5, 1}.
After that, these 2 arrays are multiplyed. Because TRUE=1 and FALSE=0, the answer of the example is {TRUE, FALSE, TRUE, FALSE}*{1, 1, 0.5, 1}={TRUE*1, FALSE*1, TRUE*0.5, FALSE*1}={1*1, 0*1, 1*0.5, 0*1}={1, 0, 0.5, 0}.
Around this all is a SUM-function, which sum's the terms of the array. So SUM({1, 0, 0.5, 0}) = 1.5.
Hope this helps.
- Asser
Bookmarks