• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How do I copy part of two cells into one cell

steve tatum

New Member
I am trying to copy partial data from two different cells and combining the data into one cell. For example if the data in A1 is "123 stop" and the data in A2 is "456 stop" then A3 is "123 456".
 
At very beginner level using SEARCH (for space position)
and LEFT Excel functions …
To get a targeted answer sample is must..

Try this...
=TRIM(SUBSTITUTE(A1&A2,"stop",""))
Thanks. But what if A1 is "123 stop" and A2 is "45678 dontstop". I want A3 to be "12345678". A1 and A2 could be various values. I would like code that generically looks for a space from the left and copies the data from the left of the space.
 
Thanks. But what if A1 is "123 stop" and A2 is "45678 dontstop". I want A3 to be "12345678". A1 and A2 could be various values. I would like code that generically looks for a space from the left and copies the data from the left of the space.

That's why narayan already asked for a sample in your very first reply.
Can we have the same?

You may simply try this...

=MID(A1,1,FIND(" ",A1)-1)&MID(A2,1,FIND(" ",A2)-1)
 
Back
Top