Adding numbers enclosed in characters - excel

I am trying to add numbers in excel which contain characters.
For example, I want to add
rs30/-
rs40/-
rs45/-
I want result as rs115/-
I tried
=SUM(IF(ISNUMBER(--A1:A3),--A1:A3))
but that gives zero.

You can use MID to extract the number text from the character string, then VALUE to convert that text to an actual numerical value, then add those using SUM, then use & to concatenate with the characters you want before and after the result.
Example:
="rs" & SUM(VALUE(MID(A1:A3,3,LEN(A1:A3)-4))) & "/-"
entered as an array formula using Ctrl Shift Enter.

You might prefer to strip out rs and /- (with Find & Select), then format as:
"rs"0"/-"

Related

Excel: How to extract text strings from a formula?

I want to split text strings from the below formula in a cell that generates a numeric value.
=RTD($A$1;;"aaa#bbb//ccc////ddd")
Using the mid & search funktion to split certain parts such as =MID(A23; SEARCH("////";A23)+4; 3) only works if text is stored in cells, but not on a formula in the cell.
How to extract strings from a formula?
As per the comment section you can use FORMULATEXT(). If you have TEXTAFTER() available, try:
=LEFT(TEXTAFTER(FORMULATEXT(A1),"////"),3)
If you don't want to use the formulatext function, you can use the find and replace. Replace for exampel the "=" with "#="
Then you can extract what ever you want with the mid function.
When you are done replace "#=" with "="

How to replace string with the number

I want to replace the comma separated letters in a cell with the numbers. I've used the=LOOKUP(A1,{"a","b","c","d","e"},{1,2,3,4,5}) function but it's only working for the single letter.
for example: my desired output:
a => 1
If you have Excel 2016+ with the TEXTJOIN function, you can use the array formula:
=TEXTJOIN(",",TRUE,CODE(UPPER(FILTERXML("<t><s>"&SUBSTITUTE(A1,",","</s><s>")&"</s></t>","//s")))-64)
Since this is an array formula, you need to "confirm" it by holding down ctrl + shift while hitting enter. If you do this correctly, Excel will place braces {...} around the formula as observed in the formula bar
Algorithm:
Convert comma-separated string to XML: "<t><s>"&SUBSTITUTE(A1,",","</s><s>")&"</s></t>"
Use FILTERXML to convert the XML to an array of strings
UPPER to make case insensitive
CODE(…) - 64 to convert to a series of numbers related to the letter)
TEXTJOIN to put the result together

Formula to print 'X' if comma separated string value = '<value>'

I am trying to have Excel print 'X" in a table column based on if a specific value is found in a comma separated string given to me from a Microsoft Form.
I removed the characters I don't want, and now my comma separated string is just that, comma separated only.
I have tried a formula where if I search the string and it finds the value I am looking for, it returns to the corresponding table column with 'X'.
Original Output from Microsoft Forms:
["ViewPoint","B2W Estimate","Nektar Equipdata"]
I have used this formula to strip characters that I don't want/need.
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(Applications[Applications], "[", ""),"""",""),",",", "),"]","")
This is the formula I am trying to use to get the corresponding column to input what I want.
=IF([Column7]=(SEARCH("ViewPoint",[Column7])),"X","")
Here is the expected and the actual result :
Expected Result: "X"
Actual Result: "#NAME?"
This should work, if i understand your question correctly.
=IF(ISNUMBER(SEARCH($B$1,A4)),"X","-")
If you want the total number of occurances in the column, you need this ARRAY Formuly CTRL + SHIFT + ENTER
=SUM(ISNUMBER(SEARCH($B$1;A4:A7))*1)
I believe you get he #NAME? result if the searched item doesn't contain the string of interest, because it is checking "Does myString = #ERR ?"
In addition to the other answer, you could also try:
IF(ISERROR(SEARCH(...)),"X","-")

extract last number from the right until special character

I'm new to excel , example of data that i need extract the last number until it found comma ","
712044789659787268,"ほんとやめて、視聴者を殺しに来るのは",1.0
Result should be 1.0
i tried =RIGHT(C1,FIND(",",C1)+1) but didn't solve
try this..
=TRIM(RIGHT(SUBSTITUTE(C1,",",REPT(" ",LEN(C1))),LEN(C1)))
I tried this Formula and it worked.
=SUBSTITUTE(RIGHT(SUBSTITUTE(A18,",",REPT(",",20)),20),",","")
This is basically replacing all "," with 20 commas, taking the last 20 characters and replacing the left commas with blanks.
This will output a string. If you want a number just add a +0 at the end of the formula
You can use this:
=RIGHT(C1,LEN(C1)-FIND(""",",C1)-1)
It just finds the ", and displays the rest of the string after its location.

Excel - pick specific characters from a string after a number

I have a list of strings where I want to split the numbers and alphabets part. For e.g. in cell A1 I have "FNN-12345 - Sample Text - 2016_AA1.1" (without the quotes ""). I want to split it to get just "Sample Text - 2016_AA1.1".
Appreciate any guidance on the formula.
Cheers.
This is the universal solution, no matter what the first alphanumeric string is:
=RIGHT(A1,LEN(A1)-FIND(" - ",A1)-2)
It finds the first occurence of the string " - " and keeps only the part after that string.
You can use the functions to manipulate strings of characters in Excel like Left, Right or Mid to get the desired result in combination with a Lenghth function.
As such for you result you could try :
=RIGHT(A1, LEN(A1) - LEN("FNN-12345 - "))
This formula would take the length of the entire cell and remove the FNN-12345 - part. Of course you can add a column which contain the desired elements to be removed.
If the text which you want to select begin always on the position 13 (as in your example), use the formula
=RIGHT(A1,LEN(A2)-12)
(supposing your original text is in the cell A1).
If you recognize the start of text by the pattern " - ", use the formula
=RIGHT(A3,LEN(A3) -FIND(" - ",A4)-LEN(" - ")+ 1)

Resources