What is the correct syntax to number format a cell to within a loop? I have:
I need to have cell.Offset(0, 5).value to be in accounting number format. Can someone educate me on the correct syntax. I've tried:
The code does not throw an error, but it does not output the correct result. Many thanks for any help.
Code:
dws.Range("B" & dlr).value = cell.value
dws.Range("C" & dlr).value = cell.Offset(0, 1).value
dws.Range("F" & dlr).value = cell.Offset(0, 3).value
dws.Range("G" & dlr).value = cell.Offset(0, 4).value
dws.Range("H" & dlr).value = cell.Offset(0, 5).value
dws.Range("I" & dlr).value = cell.Offset(0, 2).value
dws.Range("J" & dlr).value = cell.Offset(0, 6).value
Code:
Format(cell.Offset(0, 5).value, "($*#,##0.00_);_($*(#,##0.00);_($*””_””??_);_(@_)")