EXCEL: How to separate words on Excel - excel

Here is an example cells
AED+FGH
AACDV+GFH
AFGH+ FGH
SDF+ GH
ADFG+ SDDF
HGJ+ HJ
If I want to separate the letters before/after the '+' - how do I do this?
Thank you.

There's Text to Columns, using + as a delimiter. That's probably the quickest way.
Select the data, then go to Data --> Text to Columns. Choose "Delimited", using a + delimiter. If you want, choose a destination (that's optional, you can just click "Finish" which will overwrite the current data).
Alternatively, you can use LEFT() and RIGHT().
To get parts left of the +:
LEFT(A1,SEARCH("+",A1)-1)
and right of the +:
RIGHT(A1,LEN(A1)-SEARCH("+",A1))

Related

Notepad to Excel column conversion - How to Parse one mixed string to 2 different column in excel

I have data in notepad with more than 1000+ entries, which need to convert in to Excel with particular break based on length. can someone help
011000015FRB-BOS FEDERAL RESERVE BANK OF BOSTON MABOSTON Y Y20040910
File format is as below
Position Field
1-9 Routing number
1 Office code
I tried delimiting option but dint worked out.
If your data always has the routing number in columns 1-9, then delimited import is the way to go. Choose Import From Text, then select Fixed Width and click Next. On Step 2, click at each character that would be a separator. Eg, click at character 9 to split it into two columns with the first column haviong the first nine characters and the second column having the rest. Step 3 will allow you to set the data format. I'd recommend setting the first column to text so Excel doesn't try to use scientific notation or something on your account numbers.

Why when I use text to column Excel changes my numbers

For example I have this line right here:
-2.7769,-5.6967,5.9179,0.37671,1
When I convert text to column using as delimiter comma in preview I see the result just right:
-2.7769 -5.6967 5.9179 0.37671 1
But when I press confirm I get this:
-27.769 -56.967 59.179 0.37671 1
How can I stop it from doing that and get the desired outcome?
I tried to make a line separated with commas into columns using the text to column feature from excel but I didn't get the result I was hoping for.
I don't know the entire solution, but I clearly see that you are mixing up decimal delimiter and thousand delimiter:
I guess that you mean "-2.7769" meaning "minus two, followed by a decimal separator, followed by .7769 (a number between zero and one)", but what your computer understand is: "minus twenty-seven thousand, seven hundred and sixty-nine, but the user has put the thousand separator at the wrong place. I will correct this."
In order to check whether or not your Excel is using a thousand separator, you can ask a random cell's formatting (right-click, choose "Format cells"): the "Use 1000 Separator (,)" checkbox in the "Number" chapter should be unchecked, as in this screenshot:

Fixed width flat file column addition via Excel or Notepad++

I have a fixed width flat file with n columns. I need to add a new column at the end that is a concatenation of some of the columns.
Eg.
0624 11011 LOCA
0624 11031 LOCC
0624 11041 LOCB
turns into
0624 11011 LOCA 0624LOCA-ABC
0624 11031 LOCC 0624LOCC-ABC
0624 11041 LOCB 0624LOCB-ABC
I imported file files as text in Excel and was able to generate the column quickly using the concatenate function.
But I now need to generate it as the flat file again. How do I do this?
Is there a feature in Excel to allow me to generate the sheet as a flat file with spaces. Or can I "transfer" the column to the same file in Notepad++.
I am looking for a handy keyboard option, else I have to go to SQL.
With Npp, I'd do:
Ctrl+H
Find what: ((\S+)\s+\S+\s+(\S+))
Repace with: $1 $2$3-ABC
Replace all
Make sure you have checked Regular Expression.
I assume that the delimiter is one space.
In Excel, click Save as, and choose the "save as type:" "Formatted Text (space delimited)".
Alternative, in Notepad++, if they are fixed width to start with, use Column Copy/Paste to build the extra column. (Hold Left ALT down while highlighting 1 column, CTRL+C then put cursor at end of first line, add a few spaces, click CTRL+V. Repeat for 2nd column ;)
If you need to add additional text to all columns (ie hyphen seperating them), Use the Left ALT trick again to highlight a zero width selection across all rows, then just type .. it'll mirror the typing for all rows :)
If you're file is significantly larger, however, I'd stick with Excel, or try Toto's Regular Expression replace ;)

Mid Function for Microsoft Excel to obtain column .txt file

Captain Morgan ------ Insane Journeys -------- A-
I have easily gotten the left and right side parts using Left() and Right() functions.
I want to use a function in excel (not vba) that will allow me to get the middle phrase in this sentence (The dashes are really excessive spaces). can I accomplish this with a Mid() function?
This is just 1 item on a list of 80 different things in 1 column that needs to be turned into 3 columns. Every item has different character lengths. So the length counts cannot be manually entered.
I agree with Text to Columns but the image in the other answer only has one space per row while OP has some spaces that are redundant and some that are not. For this I’d suggest a modified approach:
Replace all pairs of spaces with a character unlikely to be encountered – I’d suggest a pipe.
Apply Text to Columns with pipe as delimiter.
Apply TRIM to the middle column to remove any remaining redundant spaces (eg =TRIM(B1) copied down and then that column pasted as values over the source).
But to answer can I accomplish this with a Mid() function? I think yes though not cost effective for a mere 80 entries when there is a viable alternative.
Try to use "Text to columns" from Data Tab. It has option to split data to different columns using various criteria.
All you need to do is select data you want to split to columns and select criteria you need.
In your case it can be either Space or Other:. When you select Other: you can add your own criteria like "space dot space" or anything you need.
For more detailed information you can enter this link.

Return all characters but the first X amount Excel 2007

I've got a long list of codes and text in the same cell. I need to return all the text from the right BUT the first five characters
ex. V2341 something here
I need to return the something here
=RIGHT(LEN(A1)-5)
That's what I've tried, but no luck with it. I know it's gotta be close to correct, what am I missing?
Thanks.
You're looking for MID.
If column A contains
A C D
==================== ====================== ==============
1 ABCDE12345 D1=MID(A1, 6, LEN(A1)) 12345
2 ABCDE1234567890ABCD D2=MID(A2, 6, LEN(A2)) 1234567890ABCD
REPLACE function can also be used to replace a designated number of characters with nothing, i.e.
=REPLACE(A1,1,5,"")
You can also select the whole column, use ctrl+f, then find and replace the 'v' with nothing. This will work easily if you have the same first amounts you are trying to get rid of.
If you are trying to get rid of the same number of characters, but they are different characters, you can go to Data -> Text to Columns (in Data Tools Sections). Then select the radio button fixed width. Click Next. Move the line in the graphic to the position you want it in, click Finish.

Resources