Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
GEORGIA
 
Posts: n/a
Default moving minus sign from right to left

I have worksheet that has "-" on the right side of the number
14.59-
45.99-
I have used
=IF(RIGHT(J2,2)="-",-SUBSTITUTE(J2,"-",""),J2)
which logical test should return "True".

However, it is returning "false" for all of the numbers. even with ones
without "-" on the right.
I have text column to "General", "number" and "Text".

help!
Thank you!
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Take a look he

Convert trailing minus signs
http://www.mcgimpsey.com/excel/postfixnegatives.html

In article ,
"GEORGIA" wrote:

I have worksheet that has "-" on the right side of the number
14.59-
45.99-
I have used
=IF(RIGHT(J2,2)="-",-SUBSTITUTE(J2,"-",""),J2)
which logical test should return "True".

However, it is returning "false" for all of the numbers. even with ones
without "-" on the right.
I have text column to "General", "number" and "Text".

help!
Thank you!

  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

You are testing to see if 2 characters are equal to a single character.
That's rather unlikely to ever be true.

Try using RIGHT(J2,1) ="-" instead


"GEORGIA" wrote:

I have worksheet that has "-" on the right side of the number
14.59-
45.99-
I have used
=IF(RIGHT(J2,2)="-",-SUBSTITUTE(J2,"-",""),J2)
which logical test should return "True".

However, it is returning "false" for all of the numbers. even with ones
without "-" on the right.
I have text column to "General", "number" and "Text".

help!
Thank you!

  #4   Report Post  
dave m
 
Posts: n/a
Default

Hi Georgia,
copy this fomula and it will work
=IF(RIGHT(j2,1)="-",-SUBSTITUTE(j2,"-",""),j2)
Your idea was close but not quite.
Hope this helps
Rgds,
Dave
"GEORGIA" wrote:

I have worksheet that has "-" on the right side of the number
14.59-
45.99-
I have used
=IF(RIGHT(J2,2)="-",-SUBSTITUTE(J2,"-",""),J2)
which logical test should return "True".

However, it is returning "false" for all of the numbers. even with ones
without "-" on the right.
I have text column to "General", "number" and "Text".

help!
Thank you!

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
strip minus signs from right to left Heather Excel Discussion (Misc queries) 2 April 21st 05 05:52 PM
Align $ sign next to numbers Christina Excel Discussion (Misc queries) 5 April 7th 05 07:21 PM
I want to get brackets round my figures not minus signs Peru Excel Discussion (Misc queries) 3 February 3rd 05 09:30 PM
moving mouse highlights cells without touching left mouse button bremboy Excel Discussion (Misc queries) 2 January 27th 05 06:19 PM
minus formel/fortegn Bella Excel Discussion (Misc queries) 1 December 15th 04 08:37 PM


All times are GMT +1. The time now is 05:21 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"