#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default The LEFT Function

Hi,
Why can't I treat the result of the LEFT function as a number (if taken from
a string of numbers) and not as a string?
I tried format cells but to no avail.

Thanks,
Assaf.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default The LEFT Function

LEFT returns text; convert text to number with a pair of negation operators;
=--LEFT(A1,3)
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"assaf1978" wrote in message
...
Hi,
Why can't I treat the result of the LEFT function as a number (if taken
from
a string of numbers) and not as a string?
I tried format cells but to no avail.

Thanks,
Assaf.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default The LEFT Function

If A1 contains 123abc then=--LEFT(A1,3) gets you the number (as a number)

The double minus sign is a very common trick
--
Gary''s Student - gsnu200745


"assaf1978" wrote:

Hi,
Why can't I treat the result of the LEFT function as a number (if taken from
a string of numbers) and not as a string?
I tried format cells but to no avail.

Thanks,
Assaf.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default The LEFT Function

Thank you Bernard & Gary's Student - u've been most helpful!

"assaf1978" wrote:

Hi,
Why can't I treat the result of the LEFT function as a number (if taken from
a string of numbers) and not as a string?
I tried format cells but to no avail.

Thanks,
Assaf.

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
MID function from right to left nsv Excel Worksheet Functions 4 May 8th 23 11:41 AM
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Left vs Left$ function Andy Excel Discussion (Misc queries) 5 May 6th 07 04:06 AM
LEFT function Pat Dools Excel Discussion (Misc queries) 1 June 5th 06 04:12 AM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM


All times are GMT +1. The time now is 01:07 PM.

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

About Us

"It's about Microsoft Excel"