Repeat Extracted Data In Advanced Filter

Excel777

Well-known Member
Joined
Jul 3, 2009
Messages
914
Office Version
  1. 2019
Hi,
i wann get the extracted data repeated for every criteria like here

Data Criteria Results

<table border="0" cellpadding="0" cellspacing="0" width="480"><tbody><tr style="height:15.0pt" height="20"><td class="xl66" style="height:15.0pt" height="20">Number</td> <td class="xl66" style="border-left:none">Rfer To</td> <td>
</td> <td align="left">Number</td> <td>
</td> <td class="xl66">Number</td> <td class="xl66" style="border-left:none">Rfer To</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> <td>
</td> <td class="xl65">1</td> <td>
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> <td>
</td> <td class="xl65">1</td> <td>
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td> <td colspan="3" style="mso-ignore:colspan">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td></tr></tbody></table>


Thanks & Regards
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi, You probably have not got a reply because it is not clear what your criteria is !!
Do you mean if the Total of the "1" 's in the "Numbers" column is 2 then you want the basic set of data repeated twice, or something else, please Explain further.
Regard Mick
 
Upvote 0
yes , this is what i mean

example if i have criteria as number "1" i would have results like that

Data Criteria Results

<table border="0" cellpadding="0" cellspacing="0" width="480"><tbody><tr style="height:15.0pt" height="20"><td class="xl66" style="height:15.0pt" height="20">Number</td> <td class="xl66" style="border-left:none">Rfer To</td> <td>
</td> <td align="left">Number</td> <td>
</td> <td class="xl66">Number</td> <td class="xl66" style="border-left:none">Rfer To</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> <td>
</td> <td class="xl65">1</td> <td>
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> <td>
</td> <td class="xl65">
</td> <td>
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td> <td colspan="3" style="mso-ignore:colspan">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">
</td> <td class="xl66" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">
</td> <td class="xl66" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">
</td> <td class="xl66" style="border-top:none;border-left:none">
</td></tr></tbody></table>and if i have criteria as number "1" twice i would have results like that

Data Criteria Results

<table border="0" cellpadding="0" cellspacing="0" width="480"><tbody><tr style="height:15.0pt" height="20"><td class="xl66" style="height:15.0pt" height="20">Number</td> <td class="xl66" style="border-left:none">Rfer To</td> <td>
</td> <td align="left">Number</td> <td>
</td> <td class="xl66">Number</td> <td class="xl66" style="border-left:none">Rfer To</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> <td>
</td> <td class="xl65">1</td> <td>
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> <td>
</td> <td class="xl65">1</td> <td>
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl66" style="height:15.0pt;border-top:none" height="20">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td> <td colspan="3" style="mso-ignore:colspan">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">A</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">B</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="5" style="height:15.0pt;mso-ignore:colspan" height="20">
</td> <td class="xl66" style="border-top:none">1</td> <td class="xl66" style="border-top:none;border-left:none">C</td></tr></tbody></table>wish it clear now
 
Upvote 0
One thing you didn't state is whether you are looking for a formula approach of a macro. Here is a possible formula approach using a couple of helper cells. See if it suits your purpose.

Formulas in D2 and E2 are copied down.

Excel Workbook
ABCDEFGH
1NumberRfer ToNumberNumberRfer To36
21A11A
31B11B
41C1C
51A
61B
71C
8
Repeat Data
 
Upvote 0
yes Mr peter I'm looking for formula not a macro
you are smart, Million of thanks
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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