Solved

How to delete a character from a cell

Posted on 2003-12-01
3
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 185
fizzArray  challenge 1 115
pre4 challenge 19 115
how to split multiple lines delimiter : 8 132
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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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