2 decimal cell

  • Thread starter Thread starter Mukesh
  • Start date Start date
M

Mukesh

Is it possible to get 2 decimal cell using IF or any formula?
for example if cell A1 has or is "abc", cell A2 should be 2 decimal.

Thanks.
Mukesh
 
Try this from VBE immediate window..

If Range("A1") = "abc" Then Range("A2").NumberFormat = "0.00"

If this post helps click Yes
 
Suppose you have

A1 = abc
B1 = 1.678

Enter this formula in A2
=IF(A1="abc",ROUND(B1,2),B1)


If this post helps click Yes
 
Back
Top