Extract Rows/Cells from Master Table to Sorted Tables based on Suffix of Text.

hro5e

Board Regular
Joined
Jan 13, 2012
Messages
60
Hello fellow excellors,

I have a number of assets that contain very specific suffixes, for example:

XRD05_CV
XRD06_CV
XRD07_CV
XRD08_CV_I
XRD08_HB
XRD08_WS
XRD09_CV

These assets are listed in a master table. as you can see, there are different suffixes such as _CV, _CV_I, _HB and _WS.

Now I need to separate these assets into designated tables (without blank rows) depending on the suffix giving these results:

Sorted Table 1:
XRD05_CV
XRD06_CV
XRD07_CV
XRD08_CV_I
XRD09_CV


Sorted Table 2:
XRD08_HB

Sorted Table 3:
XRD08_WS

As you can see sorted table one has two types of suffix, _CV and _CV_I. so I would need a formula that can accommodate more than one suffix into one specific table.

If you require any further information, please ask.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Ok,

So I believe I have figured it out. Please correct me if wrong, or if you have a better solution.

Here it goes:

So I created a column that will give each possible suffix a number with this formula.

=IF(COUNTIF(F13,"*_CV"),1,IF(COUNTIF(F13,"*_CV_I"),1,IF(COUNTIF(F13,"*_PS"),2,IF(COUNTIF(F13,"*VM"),3,IF(COUNTIF(F13,"*_VS"),3,IF(COUNTIF(F13,"*_AS"),4,IF(COUNTIF(F13,"*_HB"),5,IF(COUNTIF(F13,"*_PB"),6,0))))))))

I then used this formula for the extracting of the data into the relevant table: for example, the table to extract all _CV suffix:

=IFERROR(INDEX($F:$F,SMALL(IF($H$13:H$62=1,ROW($F$13:$F$62)),ROWS($F$13:$F13))),"")


 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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