Removing of hypen in excel - excel

In excel, i have a column having data's like C-45RE. In another column of the same spreadsheet, I need to display C45RE. In excel how is it possible?

=LEFT(A1,FIND("-",A1)-1)&MID(A1,FIND("-",A1)+1,99)
In English: Take the left part of my text in A1. Stop 1 character before the -. Then add the middle part of my text in A1. Start 1 character after the -. Get up to 99 characters.

Use the SUBSTITUTE function:
=SUBSTITUTE(A1,"-","",1)

Related

reformat excel text column to specific format

I have a column in my excel that includes authors name and it looks as follows:
My goal is to remove the dates + the last comma from all of these rows to make it something like this:
Is there a way I can do it in excel?
Based on your example, in which there are multiple commas in one cell, I would go with determining the position of the last comma first (in order to know where to slice the content of said cell). Then it's a matter of IF formula based on condition in which the last 4 characters in the cell are digits:
=IF(ISNUMBER(VALUE(RIGHT(A1,4))),LEFT(A1,FIND("#",SUBSTITUTE(A1,",","#",LEN(A1)-LEN(SUBSTITUTE(A1,",",""))))-1),A1)
FYI: The "#" substitution is targeted at knowing exactly where the last comma occurs in the cell. Any other unique, not-appearing-in-the-string character would have done the same job.
I've tested the formula on below examples:

Extract Last 2 line breaks from excel

I'm trying to achieve the below:
I would like cell AD3 to pull in the last 2 lines of text from cell AC3, which will be variable and often changing. The text in cell AC3 is all separated by line breaks.
In case you're wondering, currently I just have the values typed into cell AD3 for demonstration of my goal.
Thank you!
Let's break this down. For ease of writing, I use A1.
You first want to know how many rows are in the cell.
=LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))
This formula returns a count of the character 10, which is the character used for a line break in a cell. If the cell has 5 rows, there will be 4 line break characters. If you want to return the last 2 rows, you want everything after the one but last line break character. To identify the one but last line break, subtract 1.
=LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))-1
Replace the one but last line break character with a character that you know will otherwise not be in your cell, for example the character with code 160, which is a non-printable blank.
=SUBSTITUTE(A1,CHAR(10),CHAR(160),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))-1)
Next, you want to find the position of the character 160
=FIND(CHAR(160),SUBSTITUTE(A1,CHAR(10),CHAR(160),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))-1))
Now that you know the position of that character, you can use MID() to return the text after that character (add 1 to the position of that character). Assume that the last two rows of text in A1 are never more than 99 characters, use that for how many characters you want to return. Or use your favourite big number that will do that.
=MID(A1,FIND(CHAR(160),SUBSTITUTE(A1,CHAR(10),CHAR(160),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))-1))+1,99)
Remember to format the cell with the formula to wrap!
Many ways to do this. Here's one that is easily adaptable to returning other lines.
If you have the functions available in your version of Excel, you can use FILTERXML and TEXTJOIN
=TEXTJOIN(CHAR(10),,FILTERXML("<t><s>"&SUBSTITUTE(A1,CHAR(10),"</s><s>")&"</s></t>","//s[position()>last()-2]"))
"<t><s>"&SUBSTITUTE(A1,CHAR(10),"</s><s>")&"</s></t>" creates an XML where the line breaks divide the nodes
the xpath argument "//s[position()>last()-2]") returns the last two nodes. Obviously this can be modified an many ways to return other nodes
TEXTJOIN then joins those nodes with a linebreak.
Return the last 2 lines
In B1, enter formula :
=TRIM(RIGHT(SUBSTITUTE(A1,CHAR(10),REPT(" ",399)),799))

How to split using the last backslash character as delimiter in excel 2013?

We have a list with 1000's of values in a single column.The values will be in this format
W:\RT_QAQC\Received\20160411_GDM_QA\VD\RegRef\Afr\Geology\IAE_Geology_Africa_10M
W:\RT_QAQC\Received\20160411_GDM_QA\VD\GlobRef\Ind\GIS\SS_GIS_Ind
I would like to split it using the last backslash a delemiter. So the result will be
W:\RT_QAQC\Received\20160411_GDM_QA\VD\RegRef\Afr\Geology
W:\RT_QAQC\Received\20160411_GDM_QA\VD\GlobRef\Ind\GIS
And in the next column,
IAE_Geology_Africa_10M
SS_GIS_Ind
I've tried with this one
=TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",LEN(A1))),LEN(A1)))
But it's only copying the characters after the last backslash
How about:
=MID(A1,1,FIND(CHAR(1),SUBSTITUTE(A1,"\",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1,"\",""))))-1)
This uses a simple technique to determine the position of the last occurrence of a substring in a string.
Another approach is to use tigeravatar's approach
Assuming your source data is in column A and you do not have a header row and your data start in row 1. In C1 use the formula you posted as it seems to do what you want for the second column. It also makes our life easIer on how to deal with the first column. In B1 place the following.
=LEFT(A1,LEN(A1)-LEN(C1)-1)
Results

I need a formula to have capital letter at the beguining of each cells

I'm working on excel and i have fulled 300 lines.
I want to have CAPITAL letter at the beguining of each lines;i need a formula.
What can I do because i don't want to waste time by changing lines after lines.
THANK YOU
If your cell's value contains single word you can use
=PROPER(A1)
if cell can contain few words, use this one:
=UPPER(LEFT(A1,1)) & RIGHT(A1,LEN(A1)-1)

Adding a "0" to the beginning of a 4 digit excel cell to make it a zip code.

I have a row of numbers that are zip codes but because they all start with a zero (NJ) the zero gets dropped. ie. 07749 only shows as 7749. What formula can I write in another cell that will add a zero to the beginning of each of these? Thanks, Jerry.'Jeff
You can use TEXT like this with 5 zeros:
=TEXT(A1,"00000")

Resources