Excel Formula - How to extract values between commas?

YSWOO

New Member
Joined
Dec 7, 2020
Messages
10
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
  2. Mobile
example

RANGE (A1) : AA, BB, CC, DD, EE, FF, GG, HH

TARGET
(B1) : AA
(B2) : BB
(B3) : CC
(B4) : DD
(B5) : EE
(B6) : FF
(B7) : GG
(B8) : HH

I made second part, but after second, i do not know how to make it...
=MID(A1,FIND(",",A1)+1,FIND(",",A1,FIND(",",A1)+1)-(FIND(",",A1)+1))

please help me to do..
 
Depending on just what the data can be like, that could easily fail.
Try it with this text in A1

AAAAAAAAAAA, BBBBBBBBBBB, CCCCCCCCCCC,DDDDDDDDDDD,EEEEEEEEEE,FFF,GGG
In this case, the formula could be change to

=TRIM(MID(SUBSTITUTE(A1,",",REPT(" ",1000)),1+1000*(ROW($A$1:$A$50)-1),1000))

But I agree with you, totally, that this could be failed, easily. Thank you very much for your valued feedback.
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
In this case, the formula could be change to ...
Apart from the possibility of an ever-increasing number of spaces to insert (& how would we know whether to insert 100 or 1,000 or 10,000 etc?), your approach has another fairly significant weak point: What happens if somebody subsequently inserts any new row(s) at the top of the worksheet?
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,853
Members
449,471
Latest member
lachbee

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