formula to get value between last two comma

skywalker001

New Member
Joined
Aug 11, 2016
Messages
45
hello all,

I need a formula to extract value between last two comma in a string

eg. aaa,bb_1,ccc,ddd,v

output: ddd
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Simplest thing to do may be to copy the data onto another sheet, then use text to columns with commas as the delimeter. Are there the same number of commas in every line?
 
Upvote 0
How consistent will the number of characters at the end be? Could you use the RIGHT formula to chop off the relevant data?
Another thought would be using text to columns, then using nested IF statements to check if a cell is blank. Start at the far right (a bit beyond however many columns you end up with), use ISBLANK to check if a cell is blank. if it is, check again one to the left. Once it isn't, grab the cell to the left of that one to get the data in the second to last cell.
 
Upvote 0

Forum statistics

Threads
1,222,689
Messages
6,167,647
Members
452,127
Latest member
jayneecm

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