General Format <0 |
<0.1 |
<0.01 |
<0.001 |
<0.0001 |
<0.00001 |
Private Sub CommandButton6_Click()
Dim range1 As Range
With ActiveWorkbook.Worksheets("Sheet1")
Set range1 = .[B2:B7]
End With
For Each cell In range1.Cells
Dim Original0value As String
Original0value = cell.Value
Application.findformat.NumberFormat = "General"
Application.ReplaceFormat.NumberFormat = "< 0"
With range1
.Replace What:="<?", Replacement:=Original0value, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchFormat:=True, ReplaceFormat:=True
End With
Next cell
For Each cell In range1.Cells
Dim Original1value As String
Original1value = cell.Value
Application.findformat.NumberFormat = "General"
Application.ReplaceFormat.NumberFormat = "< 0.0"
With range1
.Replace What:="<???", Replacement:=Original1value, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchFormat:=True, ReplaceFormat:=True
End With
Next cell
For Each cell In range1.Cells
Dim Original2value As String
Original2value = cell.Value
Application.findformat.NumberFormat = "General"
Application.ReplaceFormat.NumberFormat = "< 0.00"
With range1
.Replace What:="<????", Replacement:=Original2value, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchFormat:=True, ReplaceFormat:=True
End With
Next cell
' et cetera - I have only include the first 3 blocks of a possible 6
Cells.Replace What:="<", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub
< 0 |
< 0.0 |
< 0.00 |
0.001 |
0.0001 |
0.00001 |
General Format < 0 |
< 0.1 |
< 0.01 |
< 0.001 |
< 0.0001 |
< 0.00001 |
Private Sub CommandButton6_Click()
Dim range1 As Range
With ActiveWorkbook.Worksheets("Sheet1")
Set range1 = .[B2:B7]
End With
For Each cell In range1.Cells
Dim Original0value As String
Original0value = cell.Value
Application.findformat.NumberFormat = "General"
Application.ReplaceFormat.NumberFormat = "< 0"
With range1
.Replace What:="< ?", Replacement:=Original0value, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchFormat:=True, ReplaceFormat:=True
End With
Next cell
For Each cell In range1.Cells
Dim Original1value As String
Original1value = cell.Value
Application.findformat.NumberFormat = "General"
Application.ReplaceFormat.NumberFormat = "< 0.0"
With range1
.Replace What:="< ???", Replacement:=Original1value, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchFormat:=True, ReplaceFormat:=True
End With
Next cell
For Each cell In range1.Cells
Dim Original2value As String
Original2value = cell.Value
Application.findformat.NumberFormat = "General"
Application.ReplaceFormat.NumberFormat = "< 0.00"
With range1
.Replace What:="< ????", Replacement:=Original2value, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchFormat:=True, ReplaceFormat:=True
End With
Next cell
' et cetera - I have only include the first 3 blocks of a possible 6
Cells.Replace What:="<", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub
< 0 |
< 0.0 |
< 0.00 |
0.001 |
0.0001 |
0.00001 |