#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default 2 decimal cell

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



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 2 decimal cell

Try this from VBE immediate window..

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

If this post helps click Yes
---------------
Jacob Skaria


"Mukesh" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 2 decimal cell

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
---------------
Jacob Skaria


"Mukesh" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM
Batch converting CSV files from comma-decimal to period-decimal Nodles Excel Discussion (Misc queries) 3 July 5th 06 06:57 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. SUKYKITTY Excel Discussion (Misc queries) 3 July 6th 05 01:50 PM
Show a time from one calculated cell as a decimal in another cell. KathyS Excel Worksheet Functions 1 January 20th 05 01:00 AM


All times are GMT +1. The time now is 02:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"