Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default left and right function

I have data that looks like this

4.23-

100.23-
10121.23-

I need make this a number. so that it can be used in formulas
I have tried to multiple it by 1 to convert it to a number, but this
does not work.
I thinking i have to write a formula that will extract all data left of
the - sign.
What would that formula be.


Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default left and right function

Hi there,

You can use something like this ...

=LEFT(A1,LEN(A1)-1)

If you want it to be truly negative ..

=LEFT(A1,LEN(A1)-1)*-1

If you want this to work with all numbers regardless if they have a - sign
at the end of it ..

=LEFT(A1,LEN(A1)-ISNUMBER(FIND("-",A1,1)))*IF((ISNUMBER(FIND("-",A1,1))-1),1,-1)

HTH

--
Regards,
Zack Barresse, aka firefytr



wrote in message
oups.com...
I have data that looks like this

4.23-

100.23-
10121.23-

I need make this a number. so that it can be used in formulas
I have tried to multiple it by 1 to convert it to a number, but this
does not work.
I thinking i have to write a formula that will extract all data left of
the - sign.
What would that formula be.


Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default left and right function

=IF(RIGHT(A11)="-",-LEFT(A11,LEN(A11)-1),IF(RIGHT(A11)="+",--LEFT(A11,LEN(A1
1)-1),A11))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
I have data that looks like this

4.23-

100.23-
10121.23-

I need make this a number. so that it can be used in formulas
I have tried to multiple it by 1 to convert it to a number, but this
does not work.
I thinking i have to write a formula that will extract all data left of
the - sign.
What would that formula be.


Thanks.



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 to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
LEFT function-all to left of a comma? Jennifer F Excel Worksheet Functions 1 January 21st 09 11:19 PM
Left Function Beverly Excel Discussion (Misc queries) 4 September 30th 07 05:28 PM
Left vs Left$ function Andy Excel Discussion (Misc queries) 5 May 6th 07 04:06 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 04:45 AM.

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"