Negative value which isn't a negative value? And how to make it numeric.

most

Board Regular
Joined
Feb 22, 2011
Messages
107
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Mobile
Hi,
Can anyone please explain for me how this is possible and how to make it a numeric.

2dqsqy8.jpg


And no, change it to Number doesn't help, doesn't change it.
As you can see in the formula bar it doesn't contain any minus sign. But it should, because it is a negative value.

regards Marcus
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Solved my problem with VBA script, but I still would like to know how it can be minus character there which I can't remove.

Found a script online and modified it for my needs.
Code:
Sub ConvertIT()
'Convert text to numeric by copy the value from range to offset 2 columns
  Dim c As Range
  Dim i As Integer
  Dim MyNums As String
For Each c In Range("E2:E1488")
   If Application.WorksheetFunction.IsText(c.Value) Then 'check if cell is text and do some magic
     MyNums = ""
      For i = 1 To Len(c)
       If InStr(1, "0123456789", Mid(c, i, 1), vbTextCompare) > 0 Then
        MyNums = MyNums + Mid(c, i, 1)
       End If
      Next i
    If IsNumeric(MyNums) Then MyNums = -Abs(MyNums) 'make the number negative
    MyNums = MyNums / 100 'fix decimal issue
    c.Offset(0, 2).Value = MyNums 'copy the value to a cell two columns to the right
  Else
    c.Offset(0, 2).Value = c.Value 'if not text just copy
  End If
 Next
End Sub
 
Upvote 0
Do you have any Conditional Formatting for that cell (one which adds the negative sign)?

Nope, no Conditional Formatting.

But I just noticed that my other computer shows it correctly.
One is Office 365 Plus and the other one is Office Professional Plus 2016, BUT both are version 16
and English, but they have different regional settings. American 1,234.00 vs Swedish 1 234,00.

On the installation with American settings I can see the minus in the formula bar.
I'm not sure, but I would call this a bug.

Edit: Changed it to Swedish localization it still works fine, O365 issue?!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top