2 decimal cell

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
 
J

Jacob Skaria

Try this from VBE immediate window..

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

If this post helps click Yes
 
J

Jacob Skaria

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top