15,877,967 members
See more:
Workbook in Sheet1 Column I in Cell Value is 0.06% and more on how to convert percentage format to Number Format after convert number format cell value is 0.06.

But I got the result of below code as 0.00. I need output of result as 0.06.

What I have tried:

vbs
```' Set the worksheet where you want to make the conversion
Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your sheet's name.
' Find the last row in column I
lastRow = ws.Cells(ws.Rows.Count, "I").End(xlUp).Row

' Loop through each cell in column I
For Each cell In ws.Range("I1:I" & lastRow)
If cell.HasFormula = False Then ' Check if the cell
' doesn't contain a formula
If cell.NumberFormat = "0.00%" Then ' Check if the cell is
' in percentage format
cell.Value = Round(cell.Value / 100, 2) ' Convert percentage
' to decimal and round to two decimal places
cell.NumberFormat = "0.00" ' Set the number format
' to two decimal places
End If
End If
Next cell
```
Posted
Updated 8-Sep-23 10:44am
v3

## Solution 1

VBA
`cell.Value = Round(cell.Value / 100, 2)`
The result is 0.00 because 0.06 divided by 100 is 0.0006, and when you round that to 2 digits you get 0.00

If you want "6" in the cell, then multiply by 100 instead of dividing ...

## Solution 2

The value `0.06` divided by `100` equals `0.0006`. And that value rounded to two decimal places would display as `0.00`.