Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel - """"
What is the logic behind ="""" & ="r"
When we need to have "1" in a cell, we need to type = """"&1&"""" Your input will be appreciated |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel - """"
If you only want to have
"1" in a cell, then just type it in that way. No need for a formula (i.e., don't start it with a '='). However, if you want a formula, you need to account for XL using "x" as an indication that x should be treated as Text. If x is omitted, you get the null string "" To differentiate between the quotation marks at the beginning/end of a string and quotation marks that are part of a string, XL's syntax requires that the latter be doubled: "this "" will display a quotation mark within this string" If the quotation mark is the only text within the string, then it looks like """" In article , MG wrote: What is the logic behind ="""" & ="r" When we need to have "1" in a cell, we need to type = """"&1&"""" Your input will be appreciated |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel - """"
To differentiate between the quotation marks at the beginning/end of a
string and quotation marks that are part of a string, XL's syntax requires that the latter be doubled: "this "" will display a quotation mark within this string" If the quotation mark is the only text within the string, then it looks like """" To add to JE's comment, consider the following.... ="AAA""BBB" which will displays this... AAA"BBB Now, remove the 3 A's to get this modified string... ="""BBB" which displays this... "BBB Finally, remove the 3 B's from the modified string to get this... ="""" which will display the lone quote mark you asked about. As you can see, there is nothing magical about the 4 quote marks.... it is just what is left over when you remove all the text from around the double quote marks needed to display an internal single quote mark, Rick |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel - """"
So to get the literal
"1" the original poster wanted is possible very simply using ="""1""" rather than weird concatenation he was using -- Adam Vero MCP, MOS Master, MLSS, CWNA http://veroblog.wordpress.com http://www.meteorit.co.uk "Rick Rothstein (MVP - VB)" wrote: To differentiate between the quotation marks at the beginning/end of a string and quotation marks that are part of a string, XL's syntax requires that the latter be doubled: "this "" will display a quotation mark within this string" If the quotation mark is the only text within the string, then it looks like """" To add to JE's comment, consider the following.... ="AAA""BBB" which will displays this... AAA"BBB Now, remove the 3 A's to get this modified string... ="""BBB" which displays this... "BBB Finally, remove the 3 B's from the modified string to get this... ="""" which will display the lone quote mark you asked about. As you can see, there is nothing magical about the 4 quote marks.... it is just what is left over when you remove all the text from around the double quote marks needed to display an internal single quote mark, Rick |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel - """"
But why then use a formula at all?
just enter "1" In article , AdamV wrote: So to get the literal "1" the original poster wanted is possible very simply using ="""1""" rather than weird concatenation he was using -- Adam Vero MCP, MOS Master, MLSS, CWNA http://veroblog.wordpress.com http://www.meteorit.co.uk |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel - """"
So to get the literal
"1" the original poster wanted is possible very simply using ="""1""" rather than weird concatenation he was using Well, that is true if the 1 is hard-coded; but if the "1" were picked up from a reference in another cell, then the full concatenation would be required. For example, if A1 contained 1 as its contents, then another cell displaying it quoted would need to use =""""&A1&"""". The main purpose behind my post was to give insight as to why four quote marks in a row are required to display a single quote mark... remember, my post was a follow-up one to the last part of JE McGimpsey's posting and, by extension, a response to MG's statement - What is the logic behind =""""? Specifically, that statement about the four quote marks to display one quote mark is a question that comes up from time to time over in the newsgroups devoted to the compiled versions of Visual Basic; so I adapted my stock answer there for my response here. Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! | Excel Discussion (Misc queries) | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |