if cell value=3, lookup return 3 same repeat row

Joeun

New Member
Joined
Sep 10, 2017
Messages
20
Office Version
  1. 2016
Platform
  1. Windows
Hi, I need help as title. I'm try to use array index and match but couldn't find a way to duplicate the repeat row.
Column B {=INDEX(orders!$B$2:$B$40,SMALL(IF(($C$1=orders!$A$2:$A$40),MATCH(ROW(orders!$A$2:$A$40),ROW(orders!$A$2:$A$40)),""),ROWS($A$1:A1)))}
Column C {=INDEX(orders!$C$2:$C$40,SMALL(IF(($C$1=orders!$A$2:$A$40),MATCH(ROW(orders!$A$2:$A$40),ROW(orders!$A$2:$A$40)),""),ROWS($A$1:A1)))}

2nd - help on Column E too. Where Column D and F need to be match. If Column D have 3 time repeat item. Column F also need to have 3 time scanned item.

Thanks in advance.
 

Attachments

  • 1.png
    1.png
    82.3 KB · Views: 15
  • 2.png
    2.png
    107.6 KB · Views: 14
  • 3.png
    3.png
    101.3 KB · Views: 13
  • 4.png
    4.png
    64.2 KB · Views: 14
  • 5.png
    5.png
    57.4 KB · Views: 13
  • 6.png
    6.png
    61.1 KB · Views: 9
  • 7.png
    7.png
    62.6 KB · Views: 11
  • 8.png
    8.png
    57.2 KB · Views: 13

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
For the first part enter this into B5 (without Ctrl Shift Enter), drag right to C5, then copy both down as needed.
Excel Formula:
=IFERROR(INDEX(orders!B:B,AGGREGATE(15,6,ROW(orders!$A$2:$A$40)/($C$1=orders!$A$2:$A$40),ROWS(B$5:B5))),"")
Column D is a straightforward index match combination (or vlookup).
Excel Formula:
=IF(C5="","",INDEX(barcode!D:D,MATCH(B5&C5,barcode!A:A,0)))
Column E check
Excel Formula:
=IF(D5="","",IF(COUNTIF(F:F,D5)>=COUNTIF(D$5:D5,D5),"Done",""))
Note that this does will not check (for example) if 4 items are scanned but only 3 are required.
 
Upvote 0
Column B & C still not working. is there any thing that i missed?
- Turquoise,L need to duplicate 4 times as the quantity is 4
- Black,L need to duplicate 3 times as the quantity is 3

Column D im using vlookup. >>>> Thank you

Column E work amazing >>>> Thank you very much
 

Attachments

  • 9.png
    9.png
    68.8 KB · Views: 3
Upvote 0
is there any thing that i missed?
- Turquoise,L need to duplicate 4 times as the quantity is 4
No, that was something that I missed :oops:

Could you upload your test workbook on a sharing site then post a link to it? What you need will be a bit more complex so I will need something to test the formulas on.

Also, could you confirm which version of excel that you are using please. If you are using office 365, could you check to see if you have the =LET() and =FILTER() formulas available?
 
Upvote 0
Could you upload your test workbook on a sharing site then post a link to it? What you need will be a bit more complex so I will need something to test the formulas on.


Also, could you confirm which version of excel that you are using please. If you are using office 365, could you check to see if you have the =LET() and =FILTER() formulas available?
MS Office 2016

=LET() and =FILTER()
not available


Thanks in advance ?
 
Upvote 0
MS Office 2016

Please put that in your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

1624102129251.png
 
Upvote 0
For column B and C .
In B5
=IFERROR(INDEX(orders!$C:$C,AGGREGATE(15,6,ROW(orders!$B$2:$B$40)/(($C$1=orders!$A$2:$A$40)*ISERROR(MATCH($B$4:$B4,orders!$B$2:$B$40))),0)),"")
In C5
=IFERROR(INDEX(orders!$B:$B,AGGREGATE(15,6,ROW(orders!$B$2:$B$40)/(($C$1=orders!$A$2:$A$40)*ISERROR(MATCH($B$4:$B4,orders!$B$2:$B$40))),0)),"")
copied down.
Duplicate values are removed.
 
Upvote 0
I tried the suggestion from @kvsrinivasamurthy before doing this but couldn't get it working.

As far as I can see, this does what is required. Maybe someone else can simplify it.
Cell Formulas
RangeFormula
A5:A12A5=IF(ROWS(A$5:A5)>SUMIF(orders!A:A,$C$1,orders!D:D),"",ROWS(A$5:A5))
B5:C12B5=IF($A5="","",INDEX(orders!B:B,AGGREGATE(15,6,ROW(orders!$A$2:$A$40)/(orders!$A$2:$A$40=$C$1),INT(SUM(IFERROR(1/SUMIFS(orders!$D$2:$D$40,orders!$B$2:$B$40,$B$4:$B4,orders!$C$2:$C$40,$C$4:$C4,orders!$A$2:$A$40,$C$1),0))+1))))
D5:D12D5=IF(C5="","",INDEX(barcode!D:D,MATCH(B5&C5,barcode!A:A,0)))
E5:E12E5=IF(D5="","",IF(COUNTIF(F$5:F$20,D5)>=COUNTIF(D$5:D5,D5),"Done",""))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Please put that in your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
big help for the future. done editing (y)

Duplicate values are removed.
thank for try. but i dont wan the duplicate to be remove o_O

@jasonb75 many thanks for the solution. It's make my day for tomorrow ?

Regards
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

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