![]() |
Data export causing false minus signs
Greetings all,
Maybe you've seen this one before. I'm exporting numbers from a database. They always export as text. One report I recently worked on had minus symbols after the number and I need to remove the false symbols. Not all cells have them so "=right(" formula won't work. Example.. All numbers are in A column, lets say, and the formula goes in the B column. 1012.32 -1506.98 5032.56 3651.01- -3562.54 7463.66- 6373.66 My desired result is a formla that would remove the last character in the cell, but only if it's a " - ", 1012.32 -1506.98 5032.56 3651.01 -3562.54 7463.66 6373.66 Once again, thank you for all your help. Mike -- Mike Jacksonville, Florida |
Data export causing false minus signs
How about something like this:
=IF(RIGHT(A1,1)="-", LEFT(A1, LEN(A1)-1), A1) "Mike Saffer" wrote: Greetings all, Maybe you've seen this one before. I'm exporting numbers from a database. They always export as text. One report I recently worked on had minus symbols after the number and I need to remove the false symbols. Not all cells have them so "=right(" formula won't work. Example.. All numbers are in A column, lets say, and the formula goes in the B column. 1012.32 -1506.98 5032.56 3651.01- -3562.54 7463.66- 6373.66 My desired result is a formla that would remove the last character in the cell, but only if it's a " - ", 1012.32 -1506.98 5032.56 3651.01 -3562.54 7463.66 6373.66 Once again, thank you for all your help. Mike -- Mike Jacksonville, Florida |
Data export causing false minus signs
try
Sub fixrightminussign() For Each c In Selection If Right(c, 1) = "-" Then c.Value = "-" & Left(c, Len(c) - 1) Next c End Sub -- Don Guillett SalesAid Software "Mike Saffer" wrote in message ... Greetings all, Maybe you've seen this one before. I'm exporting numbers from a database. They always export as text. One report I recently worked on had minus symbols after the number and I need to remove the false symbols. Not all cells have them so "=right(" formula won't work. Example.. All numbers are in A column, lets say, and the formula goes in the B column. 1012.32 -1506.98 5032.56 3651.01- -3562.54 7463.66- 6373.66 My desired result is a formla that would remove the last character in the cell, but only if it's a " - ", 1012.32 -1506.98 5032.56 3651.01 -3562.54 7463.66 6373.66 Once again, thank you for all your help. Mike -- Mike Jacksonville, Florida |
Data export causing false minus signs
=IF(RIGHT(A1)="-",LEFT(A1,LEN(A1)-1),A1) ?
-- David Biddulph "Mike Saffer" wrote in message ... Greetings all, Maybe you've seen this one before. I'm exporting numbers from a database. They always export as text. One report I recently worked on had minus symbols after the number and I need to remove the false symbols. Not all cells have them so "=right(" formula won't work. Example.. All numbers are in A column, lets say, and the formula goes in the B column. 1012.32 -1506.98 5032.56 3651.01- -3562.54 7463.66- 6373.66 My desired result is a formla that would remove the last character in the cell, but only if it's a " - ", 1012.32 -1506.98 5032.56 3651.01 -3562.54 7463.66 6373.66 Once again, thank you for all your help. Mike -- Mike Jacksonville, Florida |
All times are GMT +1. The time now is 12:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com