Extract specific or multiple word in cell value [closed] - excel

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have a problem in excel.
I want just
SCV110FIDR357---------------------> SCV110F ID
SCV110FF5IDR321X-------------------> SCV110FF 5ID
SCV110F5IDR321X-------------------------> SCV110F 5ID

If your examples are in A1,A2 and A3 then in B1 type:
=LEFT(A1,SEARCH("ID",A1)+IF(IFERROR(NUMBERVALUE(MID(A1,SEARCH("ID",A1)-1,1)),-1)<0,-1,-2))&" "&MID(A1,SEARCH("ID",A1)+IF(IFERROR(NUMBERVALUE(MID(A1,SEARCH("ID",A1)-1,1)),-1)<0,0,-1),+IF(IFERROR(NUMBERVALUE(MID(A1,SEARCH("ID",A1)-1,1)),-1)<0,2,3))

For your limited sample data, this formula might do.
=IF(ISNUMBER(--MID(A2, FIND("ID", A2)-1, 1)), LEFT(A2, FIND("ID", A2)-2)&" "&MID(A2, FIND("ID", A2)-1, 1)&"ID", LEFT(A2, FIND("ID", A2)-1)&" ID")
Beyond adding an IFERROR function to cover data that doesn't follow the pattern you've provided, anything more complex should probably be done with a VBA UDF but more sample data together with expected results would be necessary before attempting the code.
        

Related

How do I select and return all rows in excel with the same value is a particular column [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
I want to return all rows in a particular dataset, with the value in a particular column. Without writing multiple vlookup statements and manually filtering the data. Can I do this using VBA, where it selects the data and creates new excel workbooks with this data?
I tried indexing, but it doesn't quite do what I want

Excel formula to extract string from text [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I'm using the following formula to extract a string from text in a cell by getting rid of -DCS.
The text contained in the cell: Q074-SARE_MANSONG-DCS
Formula:IF(ISNUMBER(SEARCH("DCS",H22)),LEFT(H22,FIND("#",SUBSTITUTE(H22,"-DCS","#",LEN(H22)-LEN(SUBSTITUTE(H22,"-",""))))-1),([#[<HELPER><SITE>]]))
Desired reslut: Q074-SARE_MANSONG
The problem is that it is not working for all cells. Can someone please tell me what it is that I'm doing wrong. Thanks.
If "-DCS" is always at the end of the string:
=SUBSTITUTE(A1,"-DCS","")
Use one of these formulas instead (assuming your data is in A1)
=left(A1,len(A1)-4) or =SUBSTITUTE(A1,"-DCS","")

Extracting the characters between two - in the current string in an excel macro [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a column in my data containing the following type of data
WRO2->DHLPAKET-ASCHHEIM-DI
Each group of words have its own significance.
I am looking for a way to extract the characters between the second and the third minus. (in this case, its "ASCHHEIM". it might change as per the scenario, so extracting it based on its position would be futile)
I want to extract whatever is in between those - and appear in a column of its own.
In your case, if the suggested method Text-To-Columns is not an option somehow, you could use:
=TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),2*LEN(A1)+1,LEN(A1)))
This part 2*.. stands for (N-1)*.., in this case the third 'word'
More information here

Using Excel to verify entries [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am looking for a way to automate checking a demographic sheet filled in by a trainee against an answer key.
Our sheet currently has data validation built in to return TRUE or FALSE on whether the answer matches the answer key, but I'm looking for a way to then display the exact text string, so as to provide feedback on the exact error.
For example the way it currently functions is:
Sheet1!A1=Cat
Sheet2!A1=Dog
Sheet3!A1=FALSE
What I'm looking for, is a to utilize VBA to generate a comment balloon on Sheet3!A1 and see the exact error for easier feedback.
I'm new to working with advanced functions in Excel, so if anyone has a pointer in the right direction, I would greatly appreciate it!!
I Suppose your want to check Sheet1 = Sheet2 in sheet3, and show the error if does not match.
To make it simple, just use formula in sheet 3,
=IF(Sheet1!A1=Sheet2!A1,"",Sheet1!A1 & "|" &Sheet2!A1)
if they match, nothing will be show, if they don't match, it will show Sheet1figure|Sheet2figure
this is easier than showing True/False

Stripping file extensions from file names [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a Excel spreadsheet in which one column is for accession numbers. While importing the accession numbers, the person imported the filenames instead of just numbers. So now the accession 'numbers' look like:
SRA002989.sra
SRA002986.sra
....
Is there a way to strip off the extensions and just keep the first part like SRA002989, SRA002986 etc.?
Try using the SUBSTITUTE() function. If your data is in Column A, the following will work and can be copied around as necessary.
=SUBSTITUTE(A1,".sra","")
The simplest approach would be to select the column, press CTRL + H for search and replace and to search for ".sra" and replace it with an empty value (just leave the second field empty).

Resources