Remove duplicate character in a cell - excel

I have struggle with the following case:
In cell A1 = (a)(f)(a)(b)(a), cell A2 = (d)(a)(c)(d)(g)(d)(a)(d)
How can I get the result as follow:
Cell A1= (a)(b)(f)
Cell A2 = (a)(c)(d)(g)
I use substitute only substitute one (a) with “”.
Is there is an excel formula and vba to get the result.
Thank,
Joe

If you have TEXTSPLIT:
=CONCAT("("&SORT(UNIQUE(TEXTSPLIT(A1,,"(",1))))

Related

Excel Named cell as a column inside of a formula?

I have a value in A1 that is a named cell. I want to use that value to perform an equation on a column. Something like: sum(ColumnTest:ColumnTest)
So If A1 = "C" and its a Named cell "ColumnTest"
so If I typed the following into B1 I would get "6". =Sum(ColumnTest:ColumnTest)
C1 = 1
C2 = 2
C3 = 3
Any suggestions on how to do this?
You can use the INDIRECT function:
=SUM(INDIRECT(ColumnTest&":"&ColumnTest))
or simply:
=SUM(INDIRECT(A1&":"&A1))
if the cell wasn't named.

Can't subtract text of one cell from another

Is it possible to subtract text of a cell from another text of different cell? I meant to subtract text in B1 from text in A1 using excel formula.
Cell A1 contains:
FRIENDSWOOD CITY N 77546-4005
Cell B1 contains:
77546-4005
I expect the result in C1 which can be obtained subtracting A1-B1 using formula:
FRIENDSWOOD CITY N
I tried like the below one but it gives me value error:
=A1-(RIGHT(A1,LEN(A1)-FIND(" ",A1)))
Try using this formula:
=REPLACE(A1,FIND(B1,A1),LEN(B1),"")
Here's my result:
You could also try this simple formula,
=SUBSTITUTE(A1,B1,"")

Excel formula to separate " + " of two numbers in a cell

If I in cell A1 have the formula:
=100+1250
(which equals 1350)
Is there a good way to get value 100 in A2 and 1250 in A3 with a formula? Something like; "Take value before character + in cell A2 and take value after character + in cell A3 .
In Excel 2013 and later you can use the FORMULATEXT function and parse it any number of ways.
In Excel 2010 and earlier, you have to use VBA. There's not a front-line function that can return the text of a formula in a cell.
Something like
Dim formula As String
formula = Range("A1").Formula
You might use Find/Replace (what: =, with: nothing) then:
in A2: =LEFT(A1,FIND("+",A1)-1)
in A3: =MID(A1,FIND("+",A1)+1,LEN(A1))
Select/Copy/Paste/Special the results over the top and delete Row1 (or just A1).

Insert a value to a cell in excel using formula in another cell

I need to insert a value to a cell in excel using formula in another cell.
Say
A1 = "Test"
B1 = formula to insert A1 to C1
C1 = A1
Can I write a formula in B1 to insert value in C1?
I don't need any formulas in C1.
If Yes, What should be the formula?
If there it is next to the cell AND has no value in B2, it is possible, otherwise it is not.
Use Split()
Split(CONCATENATE("Text for B1#Sperator$$",A1),"#Sperator$$",FALSE)
It really depends.
EDIT
Out dated. Only works in google sheets.
Without using VBA or formulas in column C you can't achieve this.
A simple solution using formulas:
In cell C1, paste the following formula and drag it down:
=IF(B1=1;A1;"")
So if the content of cell B1 is equal to 1, your cell at column C will display the respective value of the same row at column A.

Multiple formula in Excel

I have a table with multiple cells. I am trying to get a formula working according to the following:
If Cell A is empty then Cell D has to be empty
But if A is a number then I need to check what is in Cell B to calculate Cell D
(if Cell B = "TOP",Then Cell D= cell C*170) Or If Cell B="BAR",OR ="CAR", OR ="DAR", Then Cell D = Cell C*170)
In cell "D1"
=IF(A1="","",IF(B1="TOP",C1*170,IF(OR(B1="BAR",B1="CAR",B1="DAR"),C1*170,"NOT FOUND")))
Check if A is a number:
=IF(A1="","",IF(ISNUMBER(A1),IF(B1="TOP",C1*170,IF(OR(B1="BAR",B1="CAR",B1="DAR"),C1*170,"NOT FOUND")),"Not Number"))
You can do a nested IF statement to go in cell D1. It looks like your doing the same calculation whether B1="TOP" or your other list of variables for B1 so you can just put them all in the same OR statement. Something like:
=IF(A1="","",IF(ISNUMBER(A1),IF(OR(B1="TOP",B1="BAR",B1="CAR",B1="DAR"),C1*170,"A1 is number, B1 not in list"),"A1 not a number"))

Resources