Replace Or Substitute Inverted Commas With Nothing
Jun 17, 2006I have a problem to achieve the above subject, as per the attached picture.
View 2 RepliesI have a problem to achieve the above subject, as per the attached picture.
View 2 RepliesI m using SUBSTITUTE function to replace commas with fullstop so I can multiply the end result with a number. But when I try to multiple for example B2 (0.1831) with 5, i get the VALUE! error.
Value Real Value (after substitute function)
0,1831 0.1831
23,3333 23.3333
12,5199 12.5199
5,5000 5.5000
20,5999 20.5999
24,4671 24.4671
200,0000200.0000
2,5386 2.5386
0,4000 0.4000
1,5019 1.5019
how I can resolve this so I can use the real values for computations (eg Real value *5), without having the VALUE! error message.
I'm trying to combine 2 variable column refs and 2 fixed numbers to select a range in VBA, but I can't get the correct syntax re the number of inverted commas.
Range("" & strFrom & "4"":" & strTo & "7""").Select
(strFrom and strTo are the column variables, already defined)
I've tried every combination (except the right one!) for over an hour and just cannot get this to work.
If someone can also explain the logic around the number/placement of inverted commas it would be much appreciated - since they're all straight, I'm never sure whether I'm closing a set or opening a new set.
i have a Macro, its creating unwanted inverted commas at the start and end of the File.
File:
"SunilManual|123456790|DrivingLicence|908567543|Sunil|Manchan
|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w
|w|w|w|w|w|w|w|w|w|w|w|ww|w|w|w|w|w|w|w|w|w|w
|w|w|w|w|w|w|w|w|w|w|55|55||4|SR-1161||1234567890"
Expected File:
|SunilManual|123456790|DrivingLicence|908567543|Sunil|Manchan
|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w|w
|w|w|w|w|w|w|w|w|w|w|w|ww|w|w|w|w|w|w|w|w|w|w
|w|w|w|w|w|w|w|w|w|w|55|55||4|SR-1161||1234567890|
VBA:
Option Explicit
Sub txtt_export()
Dim buf As String, col As Long, r As Long, ws As Worksheet
[Code]....
I'd like to use VBA to create a super substitute function. For my needs, nesting is insufficient because my substitution list is at 20 and growing. To make matters worse, the function needs to be used in several places.
What I'd like to do is have a named table with two columns for the function to use as a look-up for potential substitutions. The first column would contain the original text and the second would contain the replacement text. This way, whenever new items come up, all I have to do is add them to the list. The syntax of the function would be along the lines of SUPERSUB(TextString, table), where TextString contains the text that could be modified.
I have a large spreadsheet, within which i am trying to remove commas from all cells. I get the error 'formula is too long' when I carry out the search. Some of the cells are >1024 characters in length and contain dates, text etc.
View 5 Replies View RelatedI have data coes that need to be converted, basically need to remove 1st and 12th digits, 12th digit only, or 11th digit. I have built spreadsheet with a mid sub formula to do all 3 separately, but cannot figure out how to combine the formula to do all three.
I am attaching the spreadsheet,
Following code doesn't work
Dim Value1 as String
Value1 = Substitute(Cells(4, "A"), "A", "", 1)
correct syntax to assign the result of substitute function in the Variable?
I have a formula who examines if they are the same. The last number at first quote is not a problem (the 45). The problem occurs only and allways when the horse's name have an apostrophe " ' ". In first example apostrophe is different from the usual. If i manually delay it and replace it - type keyboards apostrophe everything works fine. Obviusly its a symbol. I want a small macro for replacing all these symbols at, lets say column B ,where these names are located. How can i use substitute at this case?
I understand that Microsoft left Filesearch out of VBA for Office 2007 because it was buggy. Sadly, however, I still need it. It would help if they placed a comment in VBA help that stated that it was discontinued. As it is, they make it look as if Filesearch is still available for use. OK, I'll stop ranting now.
After reading several earlier posts, apparently I have to use the Dir function. I learn visually and cannot figure out how to use the function from the VBA help file since there are no examples. Does anyone have an example of code using the Dir function to insert filenames in an array? Once I see the code, I'm sure I can adapt it to suit my needs.
I have a whole bunch of dates in a column that look like this:
5/01/1998 when it is supposed to be 5/01/2098 is there a character you can use when you are using the find & replace mode i.e.
*/**/20** I know it is not the asterisk but I believe there is some other character that can be used and it won't change any other of the numbers except the 19. I tried reformating and it does'nt work because of the way they sent it to me.
Is there a way to use something like the SUBSTITUTE function when sending an e-mail using a macro?
Here's my ....
I've got a workbook with multiple formulas e.g.:
t=S/D
TCh=Ch*(S^2/2D)*(D/Q)
TC=Co*(D/Q)+Ch*((i-D)/2i)*Q
which are built by implementing the symbols:
t, S, D, TCh, Ch, Q, TC, Co, i
I'd like to substitute the symbols in following sequence:
t = a
S = b
D = c
TCh = d
Ch = e
Q = f
TC = g
Co = h
i = x
Questions:
1) Which formula could substitute the symbols automaticly?
2) If there are up to 100 formulas in the workbook in the range of A1:E100,-
would it be possible to to set the substitution for the mentioned range?
See the attachment.
I would like to take a string such as R0-H6-D2 and return a number (1-4) based on one of four values for R, H and D in a separate column for each. The attachment should make what I am trying to do clearer.
Substitute.png
I have a text field (description) and in the description i have a product code S followed by 7 digits and then in the process of pasting into excel i have lost the space after this code and before the next text. E.g. "Ballpoint pen S1234567With Free Delivery" should be "Ballpoint pen S1234567 With Free Delivery".
I dont know how to say =if("S" followed by 7 numbers,subsitute ..... etc)
I understand how to use IF and substitute. its the 7 numbers part i am stuck on.
I could do it in access with the wildcards but excel is different.
Adding second substitute command
What I need to do is change this:
I have numeric values in approx 1000 cell entries that I need to edit:
example cell C1 contains the value 00100300308W400
I'm trying to edit this entry to show 00/10-03-003-08W4/0.
I've tried using wildcards with the SUBSTITUTE function:
=SUBSTITUTE(C1,"***************","**/**-**-***-****/*")
I can choose among three variables in cell A1. They are named P10, P50 and P90. I want to substitute them with 1,2 and 3 in cell B1. Is it possible to do this by using the substitute-function or do I have to use a nested IF.
View 2 Replies View RelatedIs this possible because when i try to use the Substitute formula my Concatenate formula is doesn't work. This data in cell A1 is linked from another sheet
PHONE
WIRE
CANDY
INDIA
When I use the Concatenate formula only, it works fine but when i try to add the Substitute to this, it looks like this
PHONE WIRE CANDY INDIA
I want it to look like this, removing any blank lines within cell A1
PHONE
WIRE
CANDY
INDIA
Something wrong with the formula? how come it doesn't do both?
=SUBSTITUTE(CONCATENATE(A1),CHAR(10),"")
if i obtain an eqn by plotting a graph in excel, etc,
y = 1.22952117E-06x3 - 1.08197863E-05x2 + 9.97531712E-01x + 3.99014495E-01
and i wish to subsitube a cell value from another sheet into the 'x' in the above eqn and i need to do this 20 times.
MY DATA
LIST1 "long" strings
LIST2 strings with characters from LIST1: the order may differ
NEEDED
the expected result is the "substraction"
all characters form LIST1 which are NOT in LIST2 should appear in LIST3
COMMENT
to make it easier to read, I have put the same string in entire LIST1
EXAMPLE
LIST1LIST2LIST3ABCDABCDABCDBCADABCDCBADABCDACBDABCDADBCABCDABCDABCDADCA
I've got a small problem using VLOOKUP. If the function does not find a value, it returns #N/A. I would like it to say "Not Installed" instead.
The same goes for when VLOOKUP returns a zero - I would like it to return "Installed" instead. Since I've got a great number of rows, I would need an efficent way to change this.
I've got a bunch of formulas with cell references in them.
I've gone back and assigned names to those cells.
Is there a quick and easy way to update all the formulas with the cell names now that I've assigned them?
I have a text variable MtgDate containing "25/03/2014"
I need to produce another text variable (to build into a file name) MtgDate1 with the text "2014-03-25"
I was going to use the Substitute function to replace the "/" with a "-" then Mid to juggle the dd-mm-yyyy to yyyy-mm-dd but at the moment I can't even find the right syntax for the Substitute.
Got as far as:
[Code] .....
but this just sets MtgDate1 as "=Substitute(MtgDate, " / ", " - ") ie reduces the double quotes to single ones.
In trying to create a formula that remove EVERY symbol from a cell (C6) and replacing it with a space.... the "SUBSTITUTE" function is telling me I have too many nested Substitutes.
This is the formula:
Code:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE
(C6,"/"," "),"%"," "),"!"," "),","," "),"*"," "),"-"," "),"("," "),")"," ")
It works thus far, but I would still like to add more symbols into the nest. Is there a way/formula to do this that replaces ANY symbol with a space?
I have the formula in cell A2 =average(A100:A1100). However the range is not always the same so need a formula that will allow me to enter '200' in cell B2 and that will make the formulae in cell A2 calculate =average(A200:A1100). Likewise, if '300' is entered in cell B2 the formula in A2 will calculate =average(A300:A1100).
View 8 Replies View RelatedI have the following structure in values found within a large dataset
6A-6200 A
6A-6156-A
I used =SUBSTITUTE(CELL," ","") to remove the space in the first value: Works fine
I am trying to remove the 2nd occurence of the - in the second value: Desired Result 6A-6156A
And how I may be able to complete both within one formula.
is it possible to make a SUBSTITUTE finction non- case sensitive?
For example I want to replace all letters "e" and "E" in a cell.
Got the following formula:-
=LEFT(L5, FIND("(",L5)-1)
I need to add the SUBSTITUTE function to this but can't figure out where it goes if somebody could point me in the right direction please? My substitute formula is SUBSTITUTE(L5,"car","train").
I've in cell A1 an entry like this: 123*456*7890
=SUBSTITUTE(A1) in cell 'A2' gives me: 1234567890
=ISTEXT(A2) in cell 'A3' gives me: TRUE
BUT, =A3+1 gives me: 1234567891
Hows that happening? Substitute function gives me the output which is a TEXT, and how is it that when I add 1 to it, I get an answer? Shouldn't I get a #VALUE! error instead?