Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with a a number ending in -
Ok a system that i work with outputs a neg number like this 100-. So the
problem is this, since the system does this it make that number text. What i need is if - show up i need to some how move it to the first spot so that it can be viewed as a number and not text. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200710/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with a a number ending in -
=IF(RIGHT(A1,1)="-",-1 * VALUE(LEFT(A1,LEN(A1)-1)),A1)
"jln via OfficeKB.com" wrote: Ok a system that i work with outputs a neg number like this 100-. So the problem is this, since the system does this it make that number text. What i need is if - show up i need to some how move it to the first spot so that it can be viewed as a number and not text. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200710/1 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with a a number ending in -
Select your range and run this macro:
Sub changeCells() Dim r As Range, cell As Range On Error Resume Next Set r = Intersect(Selection.SpecialCells(xlConstants, xlTextValues), Selection) On Error GoTo 0 If Not r Is Nothing Then For Each cell In r If Right(cell, 1) = "-" Then cell.Value = CDbl(cell.Value) End If Next End If End Sub -- Regards, Tom Ogilvy "jln via OfficeKB.com" wrote: Ok a system that i work with outputs a neg number like this 100-. So the problem is this, since the system does this it make that number text. What i need is if - show up i need to some how move it to the first spot so that it can be viewed as a number and not text. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200710/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help in round up or down price to specific ending number | Excel Discussion (Misc queries) | |||
How do I keep a 17 digit number from ending in "0" in excel? | Excel Discussion (Misc queries) | |||
ending vba | Excel Programming | |||
excel format cells/Number/Category: Number problem | Excel Discussion (Misc queries) | |||
Ending Sub | Excel Programming |