Thanks again
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | 19 years | 19 Years | ||
2 | 19 years 15 days | 19 Years | ||
3 | 19 years 0 months 15 days | 19 Years | ||
4 | 19 years 2 months | 19 Years | ||
5 | 19 years 3 months | 19 Years 6 months | ||
6 | 19 years 3 months 20 days | 19 Years 6 months | ||
7 | 19 years 6 months 6 days | 19 Years 6 months | ||
8 | 19 years 7 months 1days | 19 Years 6 months | ||
9 | 19 years 9 months 20 days | 20 Years | ||
10 | 19 years 11 months 20 days | 20 Years | ||
11 | 26 years 9 months 30 days | 27 Years | ||
Sheet422 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | =LEFT(A1,FIND(" ",A1)-1)+IF(ISNUMBER(SEARCH("month",A1)),IF(MID(A1&" 0",SEARCH("years",A1)+6,2)+0>=9,1,0),0)&" Years"&IFERROR(IF(ISNUMBER(SEARCH("month",A1)),SUBSTITUTE(" "&CHOOSE(MID(A1,SEARCH("years",A1)+6,2)+0,,,6,6,6,6,6,6,,,,)&" months"," months",""),""),"") |
I need the result in the following manner:Don't know what you mean, see last row of my sample below, it's working per your previous descriptions.If you need the results presented a different way, please show samples, before and after.
A B 19 years 19 Years 19 years 15 days 19 Years 19 years 0 months 15 days 19 Years 19 years 2 months 19 Years 19 years 3 months 19 Years 6 months 19 years 3 months 20 days 19 Years 6 months 19 years 6 months 6 days 19 Years 6 months 19 years 7 months 1days 19 Years 6 months 19 years 9 months 20 days 20 Years 19 years 11 months 20 days 20 Years 26 years 9 months 30 days 27 Years
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
</tbody>Sheet422[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]B1[/TH]
[TD="align: left"]=LEFT(A1,FIND(" ",A1)-1)+IF(ISNUMBER(SEARCH("month",A1)),IF(MID(A1&" 0",SEARCH("years",A1)+6,2)+0>=9,1,0),0)&" Years"&IFERROR(IF(ISNUMBER(SEARCH("month",A1)),SUBSTITUTE(" "&CHOOSE(MID(A1,SEARCH("years",A1)+6,2)+0,,,6,6,6,6,6,6,,,,)&" months"," months",""),""),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
19 years | 19 Years 0 months |
19 years 15 days | 19 Years 0 months |
19 years 0 months 15 days | 19 Years 0 months |
19 years 2 months | 19 Years 0 months |
19 years 3 months | 19 Years 6 months |
19 years 3 months 20 days | 19 Years 6 months |
19 years 6 months 6 days | 19 Years 6 months |
19 years 7 months 1days | 19 Years 6 months |
19 years 9 months 20 days | 20 Years 0 months |
19 years 11 months 20 days | 20 Years 0 months |
26 years 9 months 30 days | 27 Years 0 months |
Don't know what you mean, see last row of my sample below, it's working per your previous descriptions.
If you need the results presented a different way, please show samples, before and after.
A B 19 years 19 Years 19 years 15 days 19 Years 19 years 0 months 15 days 19 Years 19 years 2 months 19 Years 19 years 3 months 19 Years 6 months 19 years 3 months 20 days 19 Years 6 months 19 years 6 months 6 days 19 Years 6 months 19 years 7 months 1days 19 Years 6 months 19 years 9 months 20 days 20 Years 19 years 11 months 20 days 20 Years 26 years 9 months 30 days 27 Years
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
</tbody>Sheet422
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]B1[/TH]
[TD="align: left"]=LEFT(A1,FIND(" ",A1)-1)+IF(ISNUMBER(SEARCH("month",A1)),IF(MID(A1&" 0",SEARCH("years",A1)+6,2)+0>=9,1,0),0)&" Years"&IFERROR(IF(ISNUMBER(SEARCH("month",A1)),SUBSTITUTE(" "&CHOOSE(MID(A1,SEARCH("years",A1)+6,2)+0,,,6,6,6,6,6,6,,,,)&" months"," months",""),""),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
19 years | 19 Years 0 months |
19 years 15 days | 19 Years 0 months |
19 years 0 months 15 days | 19 Years 0 months |
19 years 2 months | 19 Years 0 months |
19 years 3 months | 19 Years 6 months |
19 years 3 months 20 days | 19 Years 6 months |
19 years 6 months 6 days | 19 Years 6 months |
19 years 7 months 1days | 19 Years 6 months |
19 years 9 months 20 days | 20 Years 0 months |
19 years 11 months 20 days | 20 Years 0 months |
26 years 9 months 30 days | 27 Years 0 months |
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | 19 years | 19 Years 0 months | ||
2 | 19 years 15 days | 20 Years 0 months | ||
3 | 19 years 0 months 15 days | 19 Years 0 months | ||
4 | 19 years 2 months | 19 Years 0 months | ||
5 | 19 years 3 months | 19 Years 6 months | ||
6 | 19 years 3 months 20 days | 19 Years 6 months | ||
7 | 19 years 6 months 6 days | 19 Years 6 months | ||
8 | 19 years 7 months 1days | 19 Years 6 months | ||
9 | 19 years 9 months 20 days | 20 Years 0 months | ||
10 | 19 years 11 months 20 days | 20 Years 0 months | ||
11 | 26 years 9 months 30 days | 27 Years 0 months | ||
Sheet422 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | =LEFT(A1,FIND(" ",A1)-1)+IF(MID(A1&" 0",SEARCH("years",A1)+6,2)+0>=9,1,0)&" Years "&IFERROR(CHOOSE(MID(A1&" 0",SEARCH("years",A1)+6,2)+0,0,0,6,6,6,6,6,6,0,0,0),0)&" months" |
I would have thought a look up table would be a better way to go.....
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | 19 years | 19 Years 0 months | ||
2 | 19 years 0 months 15 days | 19 Years 0 months | ||
3 | 19 years 2 months | 19 Years 0 months | ||
4 | 19 years 3 months | 19 Years 6 months | ||
5 | 19 years 3 months 20 days | 19 Years 6 months | ||
6 | 19 years 6 months 6 days | 19 Years 6 months | ||
7 | 19 years 7 months 1days | 19 Years 6 months | ||
8 | 19 years 9 months 20 days | 20 Years 0 months | ||
9 | 19 years 11 months 20 days | 20 Years 0 months | ||
10 | 26 years 9 months 30 days | 27 Years 0 months | ||
Sheet422 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | =LEFT(A1,FIND(" ",A1)-1)+IF(MID(A1&" 0",SEARCH("years",A1)+6,2)+0>=9,1,0)&" Years "&LOOKUP(MID(A1&" 0",SEARCH("years",A1)+6,2)+0,{0,3,9},{0,6,0})&" months" |