Unable to identify the greater number

Alfredhigh

New Member
Joined
Aug 11, 2022
Messages
10
Office Version
  1. 2010
Platform
  1. Windows
Dear Sir/Mdm,



I used the "Conditional Formatting" to format the cell to greater than, but why the three cell(circle in red) didn't change color?
 

Attachments

  • Excel issue.PNG
    Excel issue.PNG
    15.9 KB · Views: 13

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the Board!

I see those numbers have "B"s and "M"s at the end of them.
Are they really numbers with some special formatting applied to them, or are they text entries?
The easiest way to check is to try changing the format of those cells to "General" and see if the appearance of those numbers change.
If they do not, then you are dealing with Text entries, which is going to make it more difficult to try to do numeric checks/calculations on.

Also, please post the Conditional Formatting Rules you are using.
 
Upvote 0
Welcome to the Board!

I see those numbers have "B"s and "M"s at the end of them.
Are they really numbers with some special formatting applied to them, or are they text entries?
The easiest way to check is to try changing the format of those cells to "General" and see if the appearance of those numbers change.
If they do not, then you are dealing with Text entries, which is going to make it more difficult to try to do numeric checks/calculations on.

Also, please post the Conditional Formatting Rules you are using.
I have tried change to "General" the "B" and "M" still the same.
 
Upvote 0
So, the issue is that you are dealing with text entries, not numeric ones, and that is why you cannot do numeric mathematical computations on them.
Any chance you can convert those entries to numbers?

I am guessing that "M" stands for millions and "B" stands for billions.
If you cannot get them to send you the data using real numbers, we could probably come up with some VBA code to convert those to valid numbers for you.
 
Upvote 0
So, the issue is that you are dealing with text entries, not numeric ones, and that is why you cannot do numeric mathematical computations on them.
Any chance you can convert those entries to numbers?

I am guessing that "M" stands for millions and "B" stands for billions.
If you cannot get them to send you the data using real numbers, we could probably come up with some VBA code to convert those to valid numbers for you.
Where to get the VBA code?
 
Upvote 0
Here is VBA code that will work.
Just select all the cells in the range that need converting, and run this VBA code:
VBA Code:
Sub ConvertNums()

    Dim cell As Range
    
    Application.ScreenUpdating = False
    
'   Run against every cell in selected range
    For Each cell In Selection
        Select Case Right(cell, 1)
            Case "M"
                cell.Value = Left(cell, Len(cell) - 1) * 1000000
            Case "B"
                cell.Value = Left(cell, Len(cell) - 1) * 1000000000
        End Select
    Next cell
    
    Application.ScreenUpdating = True
        
End Sub
If you aren't sure how to insert or run VBA code, see here: Insert and run VBA macros in Excel - step-by-step guide.)
 
Upvote 0
Here is VBA code that will work.
Just select all the cells in the range that need converting, and run this VBA code:
VBA Code:
Sub ConvertNums()

    Dim cell As Range
   
    Application.ScreenUpdating = False
   
'   Run against every cell in selected range
    For Each cell In Selection
        Select Case Right(cell, 1)
            Case "M"
                cell.Value = Left(cell, Len(cell) - 1) * 1000000
            Case "B"
                cell.Value = Left(cell, Len(cell) - 1) * 1000000000
        End Select
    Next cell
   
    Application.ScreenUpdating = True
       
End Sub
If you aren't sure how to insert or run VBA code, see here: Insert and run VBA macros in Excel - step-by-step guide.)
Hi Joe4,

Need your help after I inserted the VBA code, the cell value appeared abnormal, I have circle in blue.
 

Attachments

  • Excel issue 2.PNG
    Excel issue 2.PNG
    18.3 KB · Views: 1
Upvote 0
Hi Joe4,

But I don't want it to be Scientific Notation.
That is controlled by the format you have on that cell.
Just change it off the "Scientific" format to "General" or "Number", and it will appear the way you want.

1660833472484.png
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,449
Members
449,083
Latest member
Ava19

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