Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default removing symbols from numbers

Hello,
I have a problem with removing objects from numbers. The
first problem is that I would like to remove a # symbol
and just get the real value.
For example I have values of #4 and #15 and would like it
to read just 4 and 15.

The other problem is that I have numbers such as 185/10
and 45/0 and so forth. I would only want the whole value
185 and 45 and not the symbol / or anything after it.
Can you help me.

Thank you

Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default removing symbols from numbers

Hi Chris

In the first case if there is always a single # in fron of the number
use
=MID(A1,2,10)*1
(this assumes that the numeric part of your answer will never be more than
10 digits, if so alter the number accordingly)

For the second case use
=LEFT(A1,FIND("/",A1)-1)*1

--
Regards
Roger Govier
"Chris" wrote in message
...
Hello,
I have a problem with removing objects from numbers. The
first problem is that I would like to remove a # symbol
and just get the real value.
For example I have values of #4 and #15 and would like it
to read just 4 and 15.

The other problem is that I have numbers such as 185/10
and 45/0 and so forth. I would only want the whole value
185 and 45 and not the symbol / or anything after it.
Can you help me.

Thank you

Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default removing symbols from numbers

Hi Chris,

If you want to just delete a single character from a range
of cells, you can just select the cells you want to
perform the delete in; hit ctrl-H for find and replace;
key in the # character; leave the second field blank; and
hit replace all.

This code should do your second task. When you run the
macro any cells that are highlighted will have the slash
and the data following it trimmed.

Sub TrimSlash()
Dim intSlash As Integer

Dim rngRow As Range
For Each rngRow In Selection
intSlash = InStr(1, rngRow.Value, "/",
vbTextCompare)
If intSlash < 0 Then
rngRow.Value = Left(rngRow.Value, intSlash - 1)
End If
Next
End Sub


HTH.

-Brad
-----Original Message-----
Hello,
I have a problem with removing objects from numbers. The
first problem is that I would like to remove a # symbol
and just get the real value.
For example I have values of #4 and #15 and would like it
to read just 4 and 15.

The other problem is that I have numbers such as 185/10
and 45/0 and so forth. I would only want the whole value
185 and 45 and not the symbol / or anything after it.
Can you help me.

Thank you

Chris
.

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
cant read my excel, its just jumble of numbers and symbols!!!help! Gypsy33 New Users to Excel 6 July 10th 08 06:52 PM
Symbols instead of numbers Bradrok Excel Discussion (Misc queries) 4 February 28th 08 02:37 AM
manipulating cells with symbols and numbers [email protected] Excel Worksheet Functions 5 February 1st 07 09:33 PM
Numbers instead of symbols on scatter chart Bill Sturdevant Charts and Charting in Excel 2 June 27th 05 07:20 PM
removing symbols from numbers Chris Excel Programming 0 February 9th 04 04:10 PM


All times are GMT +1. The time now is 11:00 AM.

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

About Us

"It's about Microsoft Excel"