Link to home
Start Free TrialLog in
Avatar of jackolim
jackolim

asked on

How to delete a character from a cell

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.
Avatar of mnashadka
mnashadka

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.
Avatar of jackolim

ASKER

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?



ASKER CERTIFIED SOLUTION
Avatar of mnashadka
mnashadka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial