Convert in 2 digits or up to 1 decimal place

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Column A1:A999 contains dates. Output required in B1:B999 in 2 digits or decimal as:

For
1 01
12 12
9 09
1.5 1.5
10.5 10.5
22.5 22.5
22 22

A1:A999: Will contain only +ve integers or decimal upto 1 place
B1:B999: SHOULD contain 2 digits or decimal upto 1 place
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
The best I could come up with was to make B1 = A1, drag down.

Then highligh B and press control + 1

Format cell custom

and choose 00.0 (zero zero point zero)

OK

This gived everything 1 decimal point though.

If in Cell C1 you use:

=if(find(".",A1,1),"Decimal","")

Fill down,

then filter column C, for "#Value!" you can highlight that to re format cell to 00

Little bit long winded but it works.
 
Upvote 0
Hi,

I hope this would help you.

Sheet1

*AB
1101
21212
3505
41.51.5
510.510.5
622.522.5
72222

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=IF(ISERROR(FIND(".",A1)),TEXT(A1,"00"),A1)
B2=IF(ISERROR(FIND(".",A2)),TEXT(A2,"00"),A2)
B3=IF(ISERROR(FIND(".",A3)),TEXT(A3,"00"),A3)
B4=IF(ISERROR(FIND(".",A4)),TEXT(A4,"00"),A4)
B5=IF(ISERROR(FIND(".",A5)),TEXT(A5,"00"),A5)
B6=IF(ISERROR(FIND(".",A6)),TEXT(A6,"00"),A6)
B7=IF(ISERROR(FIND(".",A7)),TEXT(A7,"00"),A7)

<tbody>
</tbody>

<tbody>
</tbody>

Column A is where you enter the data and the result is shown in Column B

Excel tables to the web >> Excel Jeanie HTML 4

Regards,

Manuel :)
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,795
Members
451,589
Latest member
Harold14

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top