I inherited a line of code with the following type of superscript:
nm³
I cannot seem to change - or replicate - the 3 superscript. This particular 3 superscript seems distinct from that which I can create in Text Edit.app, or Microsoft Word (i.e., 3), because when I paste the superscript I create in one of those into Sublime Text, the superscript is not retained (i.e., it looks just like this: nm3).
In particular, I'd like to change it to 2. Is there a way to do this with Sublime Text, another text editor, or through a different approach? Why is this superscript different?
One possibility is that the character that you have is the UNICODE “Superscript three” ³ character (code U+0083, in the UTF-8 encoding the couple of bytes C2 B3). In this case you can substitute it with the “Superscript two” ² character (code U+0082, in the UTF-8 encoding the couple of bytes C2 B2).
If this is the case, you can copy and paste any of these characters: ¹²³⁴⁵⁶⁷⁸⁹⁰.
Related
I have a text like this:
this is any text
Could sublime text convert it to?
this-is-any-text
insert hyphens between each space
In addition to the suggestions given in the comments, there is another option - the Case Conversion plugin. Edit → Convert Case contains Title Case, Upper Case, Lower Case, and Swap Case. Case Conversion provides:
snake_case
SCREAMING_SNAKE_CASE
camelCase
PascalCase
dot.case
dash-case
separate words
separate with forward slashes
separate with backslashes
To use it, simply highlight the section of text you want to convert and select the desired operation from the menu, or use the assigned keyboard shortcut, which will show up on the menu. You can combine this with Find by using a regex pattern to only select certain areas.
Note: While I have contributed to the Case Conversion repo (I added the backslash feature), I am not its author, just a very satisfied user.
I have done as indicated by #odatnurd in sublime text I have selected the first space, then the following with CTRL + D and finally when they have all been selected I put a hyphen - and they have all been converted to a hyphen
I am struggling with finding a specified extension inside a name column.
example data:
abc.jpg
abc.jpeg
abc.abc.pdf
abc.abc.abcdf
I would like to show only:
jpg
jpeg
pdf
So basically I found out a formula which is extracting everything after the last occurrence of a specified character (in this example it is a '.') which looks like:
=TRIM(RIGHT(SUBSTITUTE(A1,".",REPT(" ",LEN(A1))),LEN(A1)))
but using this I have output :
jpg
jpeg
pdf
abcdf
How I can limit this to extract only 'extensions'? My idea is to make it 'show only if it is 4 or fewer characters).
Thanks
Assuming the data can also include occasions without a dot, then here's one solution.
Cell B2 formula:
=IF(AND(ISNUMBER(SEARCH(".",A2)),LEN(TRIM(RIGHT(SUBSTITUTE(A2,".",REPT(" ",LEN(A2))),LEN(A2))))<5),TRIM(RIGHT(SUBSTITUTE(A2,".",REPT(" ",LEN(A2))),LEN(A2))),"invalid")
Drag it down. It's first checking if 2 conditions are true:
There's a dot in the name.
The "extension" is less than 5 characters long.
If both are true, then it's returning the extension. Otherwise, show "invalid".
Here's the problem: I have a text and I want it to be represented as separate texts that is made by characters mod n. For example text: "hfhshsseekbfe...", n=5, then first one "hsb..." (1st,6th,11th character from the original), second one "fsf..." (2nd,7th,12th character from the original) and so on. It will be simpler to write a program in cpp that reads and extracts needed information (modulo n characters) from a file and writes it down in a new .txt file. But I'm not a coder, I did some of coding for my Numerical Analysis course, but there wasn't any strings. So maybe Excel have some algorithms to do it?
In excel sheet, with ExcelO365 you can use Sequence() formula with MID() function like-
=TEXTJOIN("",TRUE,MID(A1,SEQUENCE(LEN(A1),,1,5),1))
For second one just make Start Number parameter of Sequence() formula to 2 like
=TEXTJOIN("",TRUE,MID(A1,SEQUENCE(LEN(A1),,2,5),1))
I am entering a string in a Userform in Excel-VBA from the user side of the form. I would want to know how to enter the Long Hyphen.
The Small Hyphen would be Shift + - the (the minus sign button next to 0).
How would you enter the Long Hyphen on the form as I am doing a string match in my VBA code on the back-end? It can be entered with Alt+0150, but is there another simpler way?
If the option of entering the Long Hyphen doesn't work then I will handle this value on the back-end through a find and replace method or something in VBA.
👆 There is only one "Hyphen"... It's part of a ᖴᗩᗰᎥᒪƳ ᴏғ ᑕᕼᗩᖇᗩᑕ丅ᗴᖇᔕ called Dashes.
Examples:
Hyphen [-] (-)
Minus sign [−] (−)
En dash [–] (–)
Em dash [—] (—)
✱ Your browser might render them differently, but the fonts above are supposed to be [Consolas or Courier 13px] and (Arial or Helvetica 15px). While they all kind of look the same in this font, those are four different characters.
The characters can be copy/pasted directly from here - − – — into Excel (but not to the the VBA Editor), or can be produced along with 136,686 other Unicode characters, either:
with a worksheet formula, using the ᴜɴɪᴄʜᴀʀ function:
=UNICHAR(9733) 'produces a [★] star character.
programmatically with VBA, using the ChrW function:
Range("A1") = ChrW(9743) 'puts a wee [☏] rotary phone in cell A1.
More about dashes —
What they are
How to use them
"Stealing" Unicode characters from websites
There are all sorts of handy Unicode symbols — so many that it can be hard to find "just" the right one.
However you can (and will!) find other Unicode symbols on web pages that you want to use programmatically. All you need is the symbol's code, which can be determined easily:
Copy/paste the symbol from your browser (being careful to copy only the single character; no spaces, etc.) into a cell in Excel
then, go to VBA's Immediate Window ( AltF11→CtrlG ), type:
MsgBox AscW([a1])
...(Where A1 is the cell with the character). Hit Enter, and the character's Unicode code will display.
You could also use Windows' built-in Character Map utility, or one of many third-party browser plug-ins. You can even paste a symbol directly into Google to learn more about it:
Finally, no discussion on the topic of Unicode would be complete without links to:
👉 The Unicode Consortium (unicode.org) and,
👉 “ȶɦɛ 𝓒𝓸𝓸𝓵 𝕱𝖆𝖓𝖈𝖞 Ⓣⓔⓧⓣ 𝔾𝕖𝕟𝕖𝕣𝕒𝕥𝕠𝕣” (Yes, those are all plain text characters.)
...and if you're looking for a unique gift, or just want your name to go down in history for something that really matters, you can even adopt a Unicode character, starting at $100 ᴜsᴅ!
Special thanks to Vinton Cerf for adopting the Unicode Leonard Nimoy's "Live Long and Prosper" symbol.
🖖
I have a csv file which is filled automatically through a java programm. I have a line which have the following text when I open the text in Notepad++:
-LRB- from the PMI Practice Standard for Work Breakdown Structures , Oct 2000 -RRB- '',"no","f1_FRAG:1.0","f2_specialChar:1.0","f3:15.0","f4:7.0","f5:0.0","f6:2.0","f7:0.0","f8:3.7612001156935624","f9:7.0","f10:1.0","f11:1.0","f12:0.0","f13:0.0","f14:0.0,"f15_ROOT:1.0","f16_specialChar:1.0","f17_NOTHING:1.0","f18_IN:1.0""
But when I open it in excel sheet, there are two problems:
1) When I click on the cell, I see #Name error and any click on the page causes an error. I even can't close the excel window normally. I also sometimes see something like =A228 or =B223 when I click on the cell. It sounds to be read as a formula, but it actually isn't.
2) The row is not shown completely. I can't see this part when I open the file using office excel:
",f15_ROOT:1.0","f16_specialChar:1.0","f17_NOTHING:1.0","f18_IN:1.0"".
Any help is appreciated.
Since the row starts with a - (minus sign), Excel is expecting a formula.
Manually, you could either:
add an ' (apostrophe) at the beginning of the line (which tells Excel that the cell contains text), or
Format the cell as text : Right-click the cell → Format Cells → Number tab → Text
Ideally, to prevent this issue in the future, the Java program which generates the .CSV file should be changed to enclose text fields with " double quotation marks.
Oddly, that is the only field in your example that isn't surrounded by double quotes.
"-LRB- from the PMI Practice Standard for Work Breakdown Structures , Oct 2000 -RRB- ''","no","f1_FRAG:1.0","f2_specialChar:1.0","f3:15.0","f4:7.0","f5:0.0","f6:2.0","f7:0.0","f8:3.7612001156935624","f9:7.0","f10:1.0","f11:1.0","f12:0.0","f13:0.0","f14:0.0,"f15_ROOT:1.0","f16_specialChar:1.0","f17_NOTHING:1.0","f18_IN:1.0""
At the minimum, double-quotes should the used around any fields that begin with a symbol or contain a comma (like above).
1997,Ford,E350,"Super, luxurious truck"
The double-quotes will be recognized and removed by most apps that open CSV's.
Any field may be quoted (that is, enclosed within double-quote characters). Some fields must be quoted, as specified in following
rules.
"1997","Ford","E350"
Fields with embedded commas or double-quote characters must be quoted.
1997,Ford,E350,"Super, luxurious truck"
Each of the embedded double-quote characters must be represented by a pair of double-quote characters.
1997,Ford,E350,"Super, ""luxurious"" truck"
.
More about Comma Separated Value files:
Wikipedia: CSV Files - Basic Rules
RFC 2046 Standard
RFC4180 Standard
.
Surprisingly, I can't find any reference document from Microsoft that mentions starting text cells with an apostrophe. (I guess it's a secret, so if anyone asks, you didn't hear it from me.) :-)
The reason you are getting the #NAME error specifically is because Excel figures you're trying to enter a formula (because of the minus sign) but it doesn't recognize the Name of the function ("LRB")