Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how i convert "100" to "hundred"( number to text) in excel-2007 mohanraj Excel Worksheet Functions 1 May 11th 08 09:07 PM
"treat empty cells as" is greyed out in charts Fletch260473 Charts and Charting in Excel 1 July 8th 07 07:44 PM
How can I "glue" a picture in a cell and treat it as content? smaruzzi Excel Discussion (Misc queries) 3 October 25th 06 10:14 AM
how to converts a number to text eg. "2" become "two" CQ New Users to Excel 3 February 18th 06 08:25 PM
how to converts a number to text eg. "2" become "two" CQ New Users to Excel 1 February 17th 06 04:10 AM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"