Seperate Cell in Data into 2 seperate cells

buzz71023

Active Member
Joined
May 29, 2011
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone,
Need some help here.

I have data that starts in Column A2 (goes down) that consist of data, example being 102ABCYZ@1234567
I would like to separate these values where the values are split at the "@" symbol like the following in Column B and C respectively.
B would be 102ABCYZZ and column C would be 1234567.

Right now I have Column C working with the below but if there is a better way where I don't have to define 7 digits would be great as well!

Code:
=RIGHT(A2,7)

Thanks for any and all help.
BT
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
How about using "Text to Columns" & enter @ in the box marked "Other"
 
Upvote 0
Hey,

Try these formulas out,

In cell B2:
=SUBSTITUTE(LEFT(SUBSTITUTE($A2,"@",REPT("@",LEN($A2))),LEN($A2)),"@","")

In cell C2:
=SUBSTITUTE(RIGHT(SUBSTITUTE($A2,"@",REPT("@",LEN($A2))),LEN($A2)),"@","")
 
Last edited:
Upvote 0
Try this
Enter formula in B1 and drag formula across

=TRIM(MID(SUBSTITUTE($A1,"@",REPT(" ",50)),50*(COLUMNS($A:A)-1)+1,50))
 
Upvote 0
Ahh yes that is much simpler than mine!!
Also nice to read about the text to columns solution - I didn't know about that!
 
Upvote 0
Just another way

CellFormula
B2=TRIM(LEFT(SUBSTITUTE(A2,"@",REPT(" ",99)),90))
C2=TRIM(RIGHT(SUBSTITUTE(A2,"@",REPT(" ",99)),90))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thank you all for your replies.
I tried a couple and both worked great.
 
Upvote 0
Thank you Fluff.
The Text to Columns actually allowed me to build a macro to do this receptively as I import new data
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,245
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top