I assume that you need the results in two separated cells.
Also note that the key string to search for is "Total:"
Cell A11 has the following value (use different totals as to validate the different results)
Appvg - Total: 147 GB - Free:20 Gb; rootvg - Total: 247 -Free: <1 GB>
Use this formula to obtain the Total: 147 (GB)
=LEFT(SUBSTITUTE(A11,LEFT(A11,LEN("Total:")+SEARCH("Total:",A11)),""),
-1+SEARCH(" ",SUBSTITUTE(A11,LEFT(A11,LEN("Total:")+SEARCH("Total:",A11)),"")))
Use this formula to obtain the Total: 247 (-Free)
=LEFT(SUBSTITUTE(A11,LEFT(A11,
LEN("Total:")+SEARCH("|",SUBSTITUTE(A11,"Total:","|",2))),""),
-1+SEARCH(" ",SUBSTITUTE(A11,
LEFT(A11,LEN("Total:")+SEARCH("|",SUBSTITUTE(A11,"Total:","|",2))),"")))
In case the key string changes, a cell can be use to enter the key strings to search. If this is the case use these formulas:
The key string "Total:" is entered in cell A12
Use this formula to obtain the Total: 147 (GB)
=LEFT(SUBSTITUTE(A11,LEFT(A11,LEN(A12)+SEARCH(A12,A11)),""),
-1+SEARCH(" ",SUBSTITUTE(A11,LEFT(A11,LEN(A12)+SEARCH(A12,A11)),"")))
Use this formula to obtain the Total: 247 (-Free)
=LEFT(SUBSTITUTE(A11,LEFT(A11,
LEN(A12)+SEARCH("|",SUBSTITUTE(A11,A12,"|",2))),""),
-1+SEARCH(" ",SUBSTITUTE(A11,LEFT(A11,
LEN(A12)+SEARCH("|",SUBSTITUTE(A11,A12,"|",2))),"")))
All formulas work regardless of the length of the numbers