SOLVED

Clean cell for unwanted and dynamic part

Copper Contributor

Hi,

 

I have a datasheet with a lot of numbers and in each celle there is af number and a number with in a (). Does anyone know of a clever way to clean all the numbers in the () togehter with the () leaving only the number outside the () in the cell?

 

Eg. Cell A1: "256 (465)" and i want it to be "256"

 

thank you :)

 

2 Replies
best response confirmed by Daniel Kvistgaard (Copper Contributor)
Solution

=LEFT(A1,FIND(" ",A1)-1)

this will give you everything up to the first " " (space). If there isn't always a space you can swap it for =SUBSTITUTE(LEFT(A1,FIND("(",A1)-1)," ","")

 

Which will give you everything up to the first ( and then remove any blank spaces which will stop you accidently getting text back rather than numbers.

Thank you :)
1 best response

Accepted Solutions
best response confirmed by Daniel Kvistgaard (Copper Contributor)
Solution

=LEFT(A1,FIND(" ",A1)-1)

this will give you everything up to the first " " (space). If there isn't always a space you can swap it for =SUBSTITUTE(LEFT(A1,FIND("(",A1)-1)," ","")

 

Which will give you everything up to the first ( and then remove any blank spaces which will stop you accidently getting text back rather than numbers.

View solution in original post