Copy text after last comma in cell

Juleew

New Member
Joined
Nov 24, 2009
Messages
45
I am using excel 2007, I have a column of cells that contain text that is separated by commas. Each cell may have 3 commas or 5 or 2 commas. What I need to do is copy the last text after the last comma in the cell.

example
xxx,yyy,zzz copy to another cell the text zzz
xxx,yyy copy to another cell the text yyy
xxx,yyy,zzz,aaa copy to another cell the text aaa

:confused:
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Welcome to the board...

Perhaps

=TRIM(RIGHT(SUBSTITUTE(A1,",",REPT(" ",LEN(A1))),LEN(A1)))

Hope that helps.
 
Upvote 0
Reply to texasalynn
That worked great but it is only copying the first 3 chars after the last comma.
 
Upvote 0
OK the jonmo1 worked perfect, it took all characters no matter how many commas are in the string. :)
 
Upvote 0
Well I search tese forums and if I can't find it and end up asking. everybody is so responsive and supportive here. :)
 
Upvote 0
I have a similar issue. I am trying to copy text from one cell to another. The first cell contains a very long text string with the information separated by commas and enclosed by quotation marks. How do I pick and choose the text within the quotations I would like to extract? I would like to achieve this using a formula.

Example of A1:
"Internal/External Agent Calls Report","Report data from: Saturday, March 22, 2014 to Saturday, March 29, 2014","Group By","Outbound Complete","Outbound InComplete","Internal Complete","Internal Incomplete"," # - Name","Number of Calls","Average Duration","Number of Calls","Average Duration","Number of Calls","Average Duration","Number of Calls","Average Duration",,,,,,,,,,,"Filters Applied:","Relative Date:",,"Agent Group Number:","Enterprise Group ID(s):",,"71","Agent Number:","30000-39999","Display Level:","Sort Order:","Enterprise Group, Agent Group, Agent, Call Detail","by ID","Start Time:","2014-03-22","Start Time:","End Date:","00:00:00","2014-03-29","End Time:","23:59:59","Time Zone:","LOCAL","38,39,40,41,45,46","Dialed Digits: ","200",," Tuesday, April 15, 2014 15:41:42","Page -1 of 1"

Example of output I would like:
A2
Report data from: Saturday, March 22, 2014 to Saturday, March 29, 2014
A3
Sort Order:
A4
Dialed Digits:
A5
200
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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