Solved

# How to delete a character from a cell

Posted on 2003-12-01
194 Views
Hi,

I using excel XP and i had this simple problem. Example : My Cell A1 contains this text "0.251mV". How can i write a formula in Cell B1 such that the "mV" is deleted and in B1 Cell it is in scientific numbers format? I had also values like 0.2dB and 10.5W blar blar blar.... I just want to extract out their numbers and put it in another cell using a formula. Pls Help.
0
Question by:jackolim
• 2

LVL 8

Expert Comment

I'm not sure exactly what you need.  If A1 was 0.251mV, the Excel formula for this would look like:
=LEFT(A1,LEN(A1)-2)
This strips off the last 2 characters.  You can just use the RangePtr->Value to put the formula there.

To make it scientific format, set the NumberFormat to something like:
RangePtr->NumberFormat = "0.0000E+00"; // This would make it 4 decimal places.  5 would be 0.00000E+00, etc (the number of 0's after the 0.).  Good luck.
0

Author Comment

Oh what i mean is to delete the mV characters which u have shown me how. But because my A1 cell might contains 0.2mV or 0.321mV or different decimal places. But i wish to write a formula for example B1 to automatically contain the numerical result of A1..  so....example :

A1 Cell : 0.231mV                           B1 Cell should be : 0.231 (in number format)
or     A1 Cell : 1.2mV                           B1 Cell should be : 1.2 (in number format) only
or     A1 Cell : 0.231132mV                  B1 Cell should be : 0.231132 (in number format) only

So is there any formula to take out the "mV" text only from A1?

0

LVL 8

Accepted Solution

Actually, the formula that I gave you removes the last 2 characters, no matter how long the text is; so it will also delete the mV.
0

## Featured Post

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…