Looking for a sorting formula

MiniFav

Board Regular
Joined
Mar 10, 2020
Messages
81
Office Version
  1. 365
Platform
  1. Windows
I have the following table
Book1
ABCDEF
2IntervalFHFCDYWYYR
332FH 50FC 10DY 15WY 20YR3250101520
Sheet1


Cell A3 has numerous values which i would like to extract and put into the correct column. I am looking for a formula (no macros or VBA) to input into each column (B-F) which will look at column A and extract the relevant value.
Cell A3 wont always have the same information available, for example might no show DY or WY every time so in this case columns D and E would be left blank.

Does anyone have any expertise in this and able to help?
 

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
Here is one way

22 01 06.xlsm
ABCDEF
2IntervalFHFCDYWYYR
332FH 50FC 10DY 15WY 20YR3250101520
424.5YR 5698FC 5698  24.5
Extract Values
Cell Formulas
RangeFormula
B3:F4B3=LET(f,FILTERXML("<p><c>"&SUBSTITUTE($A3,CHAR(10),"</c><c>")&"</c></p>","//c"),SUBSTITUTE(FILTER(f,RIGHT(f,LEN(B$2))=B$2,""),B$2,""))
 
Last edited:
Upvote 0
Solution
Another (shorter) option that would also return the results as numbers rather than text

22 01 06.xlsm
ABCDEF
2IntervalFHFCDYWYYR
332FH 50FC 10DY 15WY 20YR3250101520
424.5YR 5698FC 5698  24.5
Extract Values2
Cell Formulas
RangeFormula
B3:F4B3=LET(s,SUBSTITUTE(CHAR(10)&$A3,CHAR(10),REPT(" ",20)),IFERROR(MID(s,FIND(B$2,s)-20,20)+0,""))
 
Upvote 0
Here is one way

22 01 06.xlsm
ABCDEF
2IntervalFHFCDYWYYR
332FH 50FC 10DY 15WY 20YR3250101520
424.5YR 5698FC 5698  24.5
Extract Values
Cell Formulas
RangeFormula
B3:F4B3=LET(f,FILTERXML("<p><c>"&SUBSTITUTE($A3,CHAR(10),"</c><c>")&"</c></p>","//c"),SUBSTITUTE(FILTER(f,RIGHT(f,LEN(B$2))=B$2,""),B$2,""))
Thank you! this is incredible.
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

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