I need to remove special characters from a cell .The cell value is $1,234.50.
I want 1234.50 as result .
Pls help me.
regards,
5star
3 3978
I need to remove special characters from a cell .The cell value is $1,234.50.
I want 1234.50 as result.
Some questions for you... - As far as VB6 is concerned, what is a "cell"? I'm guessing maybe this has something to do with an Excel worksheet?
- What have you attempted so far?
- How certain are you that the dollar sign and comma are actually stored in the cell? Perhaps the cell simply holds a number, but is displaying it in a nicely-formatted way.
I have to format a excel sheet using VB, in which a column in excel consists of amount in the format $1,234.50 . I need to format it by removing $ and , so that i will get 1234.50 value.
i tried the following syntax:
xlsheet.Cells(1, 1).NumberFormat = "text"
Error I got is :Application-defined or object-defined error.
Pls help me to get out of this pblm.
I don't think changing the number format will help, because it isn't a number to start with. How about setting .Value to Cleaned(.Value). And in a module somewhere, add this function... - Public Function Cleaned(ByVal Src As String) As String
-
Dim L As Long, I As Long, Char As String * 1
-
L = Len(Src)
-
For I = 1 To L
-
Char = Mid$(Src, I, 1)
-
Select Case Char
-
Case "0" To "9", "."
-
Cleaned = Cleaned & Char
-
End Select
-
Next
-
End Function
This will take the value and strip off everything except numeric digits and full stops. I have no idea what will happen if the cell already contains a number. You can find that out for yourself. :)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Roy W. Andersen |
last post by:
I've been searching google about this for days but can't find anything,
so I'm hoping someone here can help me out.
I'm trying to create zip-files without needing the zip-file extension in
PHP,...
|
by: Michael Hill |
last post by:
I have a number of scripts that take special characters and convert them
to their ascii equivalents and them store them in the database.
However I am running into a problem that I have some of...
|
by: prasanna.hariharan |
last post by:
Hi guys,
I want to remove certain words from a c++ string. The list of words are
in a file with each word in a new line. I tried using the
std::transform, but it dint work.
Anybody got a clue...
|
by: Jain, Pranay Kumar |
last post by:
Hello Everyone,
I have written a simple app. that converts the dataset into
excelspreadsheet.
The App. uses the following architecture.
First it generates the dataset with corresponding...
|
by: Sakharam Phapale |
last post by:
Hi All,
I am using an API function, which takes file path as an input.
When file path contains special characters (@,#,$,%,&,^, etc), API function
gives an error as "Unable to open input file"....
| |
by: sonald |
last post by:
Dear All,
I am working on a module that validates the provided CSV data in a text
format, which must be in a predefined format.
We check for the :
1. Number of fields provided in the text file,...
|
by: feucos |
last post by:
Hi all,
I am new to these so plz never mind if this is funny.
here is my problem :
Table : moody
Column : Title
|
by: cody |
last post by:
Is there a method to replace special characters like Ä (A-Umlaut) with
A, Ö (O-Umlaut) with O, and so on?
Sure, I could look for each character separately and replace it with its...
|
by: KevinADC |
last post by:
Purpose
The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |