Hi
Im extracting the times of 1st and 2nd goals from times that are a text string. The first formula works fine but the second works unless there is no second goal or if both goals are scored with single digit numbers or single and double digits. Is there a way to amend the formula so that if there is no second goal? The last two rows are an example of when there single and double digit goals causing an issue too.
Any help would be grateful
Im extracting the times of 1st and 2nd goals from times that are a text string. The first formula works fine but the second works unless there is no second goal or if both goals are scored with single digit numbers or single and double digits. Is there a way to amend the formula so that if there is no second goal? The last two rows are an example of when there single and double digit goals causing an issue too.
Any help would be grateful
GOALTIMES.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | |||||||
2 | TIMES | FIRST | SECOND | ||||
3 | 23 83 | 23 | 83 | ||||
4 | 17 45 | 17 | 45 | ||||
5 | 33 43 68 | 33 | 68 | ||||
6 | 90 | 90 | 90 | ||||
7 | 77 | 77 | 77 | ||||
8 | 10 61 | 10 | 61 | ||||
9 | 58 76 | 58 | 76 | ||||
10 | 45 | 45 | 45 | ||||
11 | 31 52 | 31 | 52 | ||||
12 | 79 | 79 | 79 | ||||
13 | 0 | 0 | |||||
14 | 16 | 16 | 16 | ||||
15 | 14 | 14 | 14 | ||||
16 | 48 90 | 48 | 90 | ||||
17 | 24 49 | 24 | 49 | ||||
18 | 26 | 26 | 26 | ||||
19 | 3 9 | 3 | 39 | ||||
20 | 5 | 26 | 5 | 5 | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D3:D20 | D3 | =NUMBERVALUE(LEFT(B3,2)) |
E3:E20 | E3 | =NUMBERVALUE(IF(ISNUMBER(VALUE(RIGHT(B3,4))),RIGHT(B3,4),RIGHT(B3,3))) |