Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing decimal from a cells value

I am trying to format a decimal number that has leading zeros and four
decimal places and want to remove the decimal but keep the structure
of the number

ie change 00000100.9730 to 000001009730.

I have tried various methods including changing the number to text the
doing a find and replace the decimal and replacing it with "" to no
avail.

I end up loosing the zeros.

Any suggestions would be appreciated
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Removing decimal from a cells value

Hi Mark:

Perhaps:

=SUBSTITUTE(TEXT(100.973,"00000000.0000"),".","")

will work for you.

Regards,

Vasant.

"Mark Williams" wrote in message
om...
I am trying to format a decimal number that has leading zeros and four
decimal places and want to remove the decimal but keep the structure
of the number

ie change 00000100.9730 to 000001009730.

I have tried various methods including changing the number to text the
doing a find and replace the decimal and replacing it with "" to no
avail.

I end up loosing the zeros.

Any suggestions would be appreciated



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing decimal from a cells value

If you put a single quote ' in front of the value and then search for
the decimal and replace it with nothing it should work:

Cells.Replace What:=".", Replacement:="", LookAt:=xlPart, SearchOrder:=
_
xlByColumns, MatchCase:=False

hth

Mike



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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
Peremanently removing decimal places jon Excel Worksheet Functions 11 May 17th 11 04:26 PM
Help with removing certain strings from cells sparkroms Excel Discussion (Misc queries) 2 July 25th 06 06:14 AM
Removing digits after decimal in "text" numbers jermsalerms Excel Worksheet Functions 3 June 21st 06 06:52 PM
Removing blank cells... Jambruins Excel Discussion (Misc queries) 0 March 31st 06 08:02 PM
Removing/adding decimal points Lou Excel Discussion (Misc queries) 2 March 2nd 05 08:56 PM


All times are GMT +1. The time now is 10:05 AM.

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

About Us

"It's about Microsoft Excel"