Solved

How to delete a character from a cell

Posted on 2003-12-01
3
198 Views
Last Modified: 2013-11-20
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
Comment
Question by:jackolim
  • 2
3 Comments
 
LVL 8

Expert Comment

by:mnashadka
ID: 9849602
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

by:jackolim
ID: 9859124
hi mnashadka,

   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

by:
mnashadka earned 50 total points
ID: 9859281
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question