How do i extract specific data into another cell?

amir988

New Member
Joined
Nov 20, 2015
Messages
13
i have this type of data in excel, in cell a4 i have text 34, in b4 i have text 21, and in c4 i have 55 (a4+b4) comma seprated values etc 32,34,54,543,567 and i want in cell d4 first 34 values (as an a4 written) and on e4 remaining 21 values (as per b4 written)


Here is the sample

5o6XbcK.png

Available = i have the data
Required= i want this data using formula ...
(see img here http: imgur.com/5o6XbcK)
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Welcome to the MrExcel board!

Try
D4: =SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(C4,",",REPT(" ",200)),6800))," ",",")
E4: =SUBSTITUTE(C4,D4&",","",1)
 
Upvote 0
D4: =trim(left(substitute(c4,",",rept(" ",255),a4),255))
e4: =substitute(c4,d4&",","")
 
Upvote 0
On re-reading after Jon's post I see I didn't understand about using the value in A4. In any case, Jon has a simpler formula for D4. :)

But possibly also this for D4:

=LEFT(C4,FIND("|",SUBSTITUTE(C4,",","|",A4))-1)
 
Upvote 0
D4: =trim(left(substitute(c4,",",rept(" ",255),a4),255))
e4: =substitute(c4,d4&",","")

thankyou john it really work, but there is small problem.

if a4 contain value 0 or empty cell, and b4 contain 55, then this formula doesn't work. (it shows #value in d4 and e4) please can u tell me what to do? thank
 
Last edited:
Upvote 0
D4: =if(a4,trim(left(substitute(c4,",",rept(" ",255),a4),255)),"")
e4: =if(b4,substitute(c4,d4&if(a4,",",""),""),"")
 
Upvote 0

Forum statistics

Threads
1,216,070
Messages
6,128,614
Members
449,460
Latest member
jgharbawi

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