Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Treat "Text" as a Number?
Excel2003
Col D contains text such as ... 15/3 ... 1/4 ... 8/14 ... etc ... with 1 to 3 numerics occuring on either side of the "/". In a conditional Formula I need to treat any "text" that looks like a number on the left side of the "/" as a number. I was using ... Sum(left(D5,1) ... as part of my formula & this was working great until I encountered the 2 & 3 characters on the left side of the "/". Now I am stuck. Thanks ... Kha |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Treat "Text" as a Number?
You can use =search() to look for the position of the slash:
=sum(--(left(d5,search("/",d5),-1),...) =left() returns text that =sum() will ignore (unless you do some other arithmetic to it). The -- stuff coerces the text to a real number. Ken wrote: Excel2003 Col D contains text such as ... 15/3 ... 1/4 ... 8/14 ... etc ... with 1 to 3 numerics occuring on either side of the "/". In a conditional Formula I need to treat any "text" that looks like a number on the left side of the "/" as a number. I was using ... Sum(left(D5,1) ... as part of my formula & this was working great until I encountered the 2 & 3 characters on the left side of the "/". Now I am stuck. Thanks ... Kha -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Treat "Text" as a Number?
Typo alert... an extra comma crept into your formula in front of the -1.
Ken, Dave meant to post this... =SUM(--LEFT(D5,SEARCH("/",D5)-1),...) Rick "Dave Peterson" wrote in message ... You can use =search() to look for the position of the slash: =sum(--(left(d5,search("/",d5),-1),...) =left() returns text that =sum() will ignore (unless you do some other arithmetic to it). The -- stuff coerces the text to a real number. Ken wrote: Excel2003 Col D contains text such as ... 15/3 ... 1/4 ... 8/14 ... etc ... with 1 to 3 numerics occuring on either side of the "/". In a conditional Formula I need to treat any "text" that looks like a number on the left side of the "/" as a number. I was using ... Sum(left(D5,1) ... as part of my formula & this was working great until I encountered the 2 & 3 characters on the left side of the "/". Now I am stuck. Thanks ... Kha -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Treat "Text" as a Number?
Thanks for the correction Rick.
"Rick Rothstein (MVP - VB)" wrote: Typo alert... an extra comma crept into your formula in front of the -1. Ken, Dave meant to post this... =SUM(--LEFT(D5,SEARCH("/",D5)-1),...) Rick "Dave Peterson" wrote in message ... You can use =search() to look for the position of the slash: =sum(--(left(d5,search("/",d5),-1),...) =left() returns text that =sum() will ignore (unless you do some other arithmetic to it). The -- stuff coerces the text to a real number. Ken wrote: Excel2003 Col D contains text such as ... 15/3 ... 1/4 ... 8/14 ... etc ... with 1 to 3 numerics occuring on either side of the "/". In a conditional Formula I need to treat any "text" that looks like a number on the left side of the "/" as a number. I was using ... Sum(left(D5,1) ... as part of my formula & this was working great until I encountered the 2 & 3 characters on the left side of the "/". Now I am stuck. Thanks ... Kha -- Dave Peterson -- Dave Peterson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Treat "Text" as a Number?
Dave / Rick ... (Good morning)
FYI ... Perfect ... Works as requested ... Thank you for supporting these boards ... Kha "Dave Peterson" wrote: Thanks for the correction Rick. "Rick Rothstein (MVP - VB)" wrote: Typo alert... an extra comma crept into your formula in front of the -1. Ken, Dave meant to post this... =SUM(--LEFT(D5,SEARCH("/",D5)-1),...) Rick "Dave Peterson" wrote in message ... You can use =search() to look for the position of the slash: =sum(--(left(d5,search("/",d5),-1),...) =left() returns text that =sum() will ignore (unless you do some other arithmetic to it). The -- stuff coerces the text to a real number. Ken wrote: Excel2003 Col D contains text such as ... 15/3 ... 1/4 ... 8/14 ... etc ... with 1 to 3 numerics occuring on either side of the "/". In a conditional Formula I need to treat any "text" that looks like a number on the left side of the "/" as a number. I was using ... Sum(left(D5,1) ... as part of my formula & this was working great until I encountered the 2 & 3 characters on the left side of the "/". Now I am stuck. Thanks ... Kha -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how i convert "100" to "hundred"( number to text) in excel-2007 | Excel Worksheet Functions | |||
"treat empty cells as" is greyed out in charts | Charts and Charting in Excel | |||
How can I "glue" a picture in a cell and treat it as content? | Excel Discussion (Misc queries) | |||
how to converts a number to text eg. "2" become "two" | New Users to Excel | |||
how to converts a number to text eg. "2" become "two" | New Users to Excel |