![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
I have a sheet imported from a mainframe which shows minus signs at the end of the cell instead of the beginning in each cell where the value is minus.
How can I correct this |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
@ Aarons site....Look here for the file. http://www.xl-logic.com/xl_files/vba/dash_masher.zip |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
Didn't download the file from Aaron's site (which is nice), so apologies if this is the same. Select your range (or modify the routine to find the range) and run this: Sub test() Dim c As Range For Each c In Selection If Not c.HasFormula And IsNumeric(c) Then c = CDbl(c) Next c End Sub |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
=IF(RIGHT(A1)="-",-LEFT(A1,LEN(A1)-1),A1)
[ This Message was edited by: Mark W. on 2002-04-26 06:51 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|