Grabbing text between slashes in Excel - excel

I have an excel sheet and was trying to figure out if there was a way to grab text b/w slashes.
For example:
[In cell B9]
R:\FINANCE-Asia\Q1Report.html
I want to pull out: FINANCE-ASIA and place it into cell C9.
Anybody know what the formula for this would be?

This is by no means a 'clean' method of going about it; and would only apply to finding the first set of text.
=LEFT(RIGHT(B9, LEN(B9)-FIND("\",B9)),FIND("\",B9, FIND("\",B9)+1)-FIND("\",B9)-1)
Slightly cleaner form:
=MID(B9, FIND("\",B9)+1, FIND("\",B9, FIND("\",B9)+1)-FIND("\",B9)-1)

Related

Excel: How to add a plus sign to numbers and how to copy actual value of that cell (+876345558)

I have a subscriber list with emails and phone numbers.
The row with the phone numbers are plain numbers (like 98734543).
With format > custom > "+0;-0;0"
I managed to transform the plain number into +98734543.
Ok - and now I feel stupid. (I wasn't able to google the solution... oh man)
How do I transform the value of the cell (I guess it's a formula now) into an actual value that I can copy into a new row in a way that the cell value isn't just (still) 98734543 but +98734543?
I tried Paste Value (E) but this didn't work either.
Help is very much appreciated, thanks!
In the cell you want the result: =TEXT(A1|"+0")
A1 referencing the source cell. Formatting options to the right of the pipe sign.
Depending on your version of Excel it might be a comma separator instead of pipe.
Since your source is a list without any format, this seems like a better solution: output a list with the wanted format.

Replace and delete part of a cell text

I have an excel spreadsheet that was exported from some software... it uses code that it understands, which makes sense, but the problem is that the output isn't always best for us humans for a quick visual. Especially when a person isn't accustomed to actually reading it.
Proof in point:
This is in cell column H:
2020-04-01T11:28:18+00:00
Now, I could create an excel formula that replaces every instance manually, but what I want to do is make is to that the T and everything right of is goes the way of the dodo.
I know that there is a substitute command in Excel, but it only would do the first, I forget if there is a way to actually make it so that it will ignore the text to the right, and just take it from the T to 14 steps right and delete it so that all that is left is the Year, day and month. I will use Excel VBA if need be, but I'd rather it be a formula if possible that I can use for a copy and paste in another sheet for readable output.
Thanks in advance.
With data in H1, in I1 enter:
=Left(H1,10)
You don't need to locate the T because its position is fixed.

CELL("contents", ) in EXCEL

I have a cell (A1) in sheet 4 that is containing the following formula:
=CELL("contents",Sheet1!B61)
However, I want to find the content of the result. When I try to formulate it
=CELL("contents",A1)
The result is the same.
What I want to find is the content of =CELL("contents",Sheet1!B61). Is it possible to enclose it with a cell function twice? I've been trying to formulate it but there is always an error.
I cannot imagine a scenario in which it would be necessary to generate text strings representing cell addresses and then reference these in formulas. However:
=CELL("contents",INDIRECT(Sheet1!B61))
is what you require.
Regards
=CELL("contents",Sheet1!B61) is the same as =Sheet1!B61.
I think you are looking for INDIRECT which will translate a cell address given as text to the value contained in the cell.
=INDIRECT(Sheet1!B61)
Idk, try a nested CELL(CELL=(...)) not sure if it will work but...
Also, can you clarify exactly what you want? When you have
=CELL("contents",Sheet1!B61)
I assume the result is a number or text or whatever
Then you say, "I want to find the content of the result". What do you mean here? You want the cell (A1) in sheet 4 to display something other than the result of the formula above? If so, just change the formula. I think I'm a little lost here...

How do I remove duplicate content within a sigle excel cell

I have individual cells in excel with the following content in each of them
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/m1423.jpg|http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/m1423.jpg
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/rt2899.jpg|http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/rt2899.jpg
This is one cell in a long row for a dump of data for products within an ecommerce site. A data migration has somehow added the same image more than once to the same product. Each separate image image is separated by the Pipe "|" symbol.
I want to search each cell in this column of the sheet and remove the duplicated image reference and the Pipe symbol.
So the examples above become
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/m1423.jpg
and
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/rt2899.jpg
The suggested answer of finding the pipe with SEARCH is a good general answer, however in this instance as the source string is always twice the length of the desired we can just chop it in half with the formula below and drag it down.
=LEFT(A1,(LEN(A1)-1)/2)
In addition to a formula, you can use Data>Text to Columns, which is a good thing to know about. Select the entire column and then you up the dialog. In step one choose "Delimited" and in step two choose the pipe symbol:
When you're finished, delete the first column.
I figured out that this works for some more complex scenarios. I think it should work for this one as well.
=IFERROR(LEFT(C2,(FIND(LEFT(C2,20),C2,2)-2)),C2)
I entered this into D2 and copied it all the way down the column. I then copied and pasted the values back into Column C.
The problem I had was that not all of the cells in my column had duplicate text. Of those that did, the duplications were not delineated by any unique character (There was a single space in front of each duplication.), and the duplicated text was often an incomplete duplication so the length was not consistently symmetrical.
The "20" is an arbitrary number of characters I picked for excel to use from the front of the text to identify where the text started to repeat. There are enough people here who know excel better than I who can explain what the rest of the formula does. I figured it out by poking around.

Excel Autocomplete/lookup that I can edit

I have a system where I enter a code in one cell and in the next cell the corresponding text appears, using a lookup table.
Cell 1: I put "W1"
Cell 2: "Make sure that both your opening and ending are interesting and engaging." appears automatically.
Of course, I can't then edit the text. If I try, I find I'm editing the lookup formula.
What I'm really trying to do:
I'm a teacher, the codes are target codes and the text is the actual advice to the pupil. We have a standard system of targets, but we tend to customise the text in different ways according to the pupil.
Am I doing this the most sensible way? Is there a workaround?
Many thanks.
Perhaps it's not you're looking for, but try the following:
Put all grades in the column 1 (corresponds to your cell 1).
Apply Lookup formula and get default answers - this for the column 2.
Now copy entire column 2 and paste special it as values to the same place.
After the above you'll get default grades as TEXT ready for your editing.
Please respond in comments in case you have some more not obvious (from the initial request) limitations.
This requires, as far as I understand it, VBA. Thanks to those below for helping me figure that out.
The answer is here:
VBA Lookup and insert on cell change

Resources