How to give remark based on specific sequence number?

Manith

New Member
Joined
Apr 14, 2020
Messages
29
Office Version
  1. 2016
Platform
  1. Windows
Hi everyone,
I have an excel problem which I want to give the remark based on the sequence number.
And the given remark is "Display". Every sneaker shoes that display in showroom should being sequence number (as show in table).
For example, if the any item has size 41, then it's priority to be display first, if size 41 no stock, then need to display size 42 (Please see the table below). And each model/code has different color, but each color need to remark based on the sequence if any size no stock. So Column E (Remark) in blue highlight is where I want to give the remark for the "Display" for the stock that have size base on the sequence number. And I hope that the formula will be working with long list. And the formula can be used for both office 2021 and 2019.
Thank you!

Display Size.xlsx
ABCDEFGHIJ
1
2CodeColorSizeQtyRemarkDisplay Sequene
3AB01Black3912No.SizeRemark
4AB01Black405141First Priority to display
5AB01Black416Display242If Size 41 run out of stock, then display size 42
6AB01Black423340If Size 42 run out of stock, then display size 40
7AB01Black437439If Size 40 run out of stock, then display size 39
8AB01White3919543If Size 39 run out of stock, then display size 43
9AB01White402
10AB01White4212Display
11AB01White4323
12AB04Blue4243
13AB04Blue3912
14AB04Blue412Display
15AB04Blue4323
16AB04Red4312
17AB04Red393Display
18AD09Silver4323
19AD09Silver4024Display
20AD09Silver392
21AD09Black4112Display
22AD09Black424
23AD09Black3923
24AD09Black436
25AD09Orange399
26AD09Orange404
27AD09Orange427Display
28AD09Orange434
29DY777Cream399
30DY777Cream402
31DY777Cream431
32DY777Cream426Display
33DY777Navy433Display
34DY777Noir405
35DY777Noir431
36DY777Noir423
37DY777Noir411Display
38PU888Light Blue415Display
39PU888Beige427
40PU888Beige416Display
41PU888Beige391
42PU888Green392
43PU888Green4011Display
44PT002Black3916
45PT002Black406
46PT002Black416Display
47PT002Blue417Display
48PT002Blue399
49PT002Purple4214Display
50PT002Purple4312
51PT002Purple399
52PT002White427
53PT002White434
54PT002White4113Display
55PT002White3915
Sheet1
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Check this and revert -

Book1
ABCDEF
2CodeColorSizeQtyRemarkRemark
3AB01Black3912 
4AB01Black405 
5AB01Black416DisplayDisplay
6AB01Black423 
7AB01Black437 
8AB01White3919 
9AB01White402 
10AB01White4212DisplayDisplay
11AB01White4323 
12AB04Blue4243 
13AB04Blue3912 
14AB04Blue412DisplayDisplay
15AB04Blue4323 
16AB04Red4312 
17AB04Red393DisplayDisplay
18AD09Silver4323 
19AD09Silver4024DisplayDisplay
20AD09Silver392 
21AD09Black4112DisplayDisplay
22AD09Black424 
23AD09Black3923 
24AD09Black436 
25AD09Orange399 
26AD09Orange404 
27AD09Orange427DisplayDisplay
28AD09Orange434 
29DY777Cream399 
30DY777Cream402 
31DY777Cream431 
32DY777Cream426DisplayDisplay
33DY777Navy433DisplayDisplay
34DY777Noir405 
35DY777Noir431 
36DY777Noir423 
37DY777Noir411DisplayDisplay
38PU888Light Blue415DisplayDisplay
39PU888Beige427 
40PU888Beige416DisplayDisplay
41PU888Beige391 
42PU888Green392 
43PU888Green4011DisplayDisplay
44PT002Black3916 
45PT002Black406 
46PT002Black416DisplayDisplay
47PT002Blue417DisplayDisplay
48PT002Blue399 
49PT002Purple4214DisplayDisplay
50PT002Purple4312 
51PT002Purple399 
52PT002White427 
53PT002White434 
54PT002White4113DisplayDisplay
55PT002White3915 
Sheet1
Cell Formulas
RangeFormula
F3:F55F3=IFS(AND(C3=41,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=41)*($D$3:$D$100))>0),"Display", AND(C3<>41,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=41)*($D$3:$D$100))>0),"", AND(C3=42,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=42)*($D$3:$D$100))>0),"Display", AND(C3<>42,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=42)*($D$3:$D$100))>0),"", AND(C3=40,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=40)*($D$3:$D$100))>0),"Display", AND(C3<>40,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=40)*($D$3:$D$100))>0),"", AND(C3=39,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=39)*($D$3:$D$100))>0),"Display", AND(C3<>39,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=39)*($D$3:$D$100))>0),"", AND(C3=43,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=43)*($D$3:$D$100))>0),"Display", AND(C3<>43,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=43)*($D$3:$D$100))>0),"",TRUE,"")
 
Upvote 0
Given that there are no rows in your sample data with Qty = 0, I assume that if an item has no stock it is removed from the list.

If that is the case and it needs to work in 2019 as well as 2021 then try the formula in column F. I have included another formula in column L in case you decide you can go with just 2021.

23 11 30.xlsm
ABCDEFGHIKL
1
2CodeColorSizeQtyRemarkRemarkDisplay SequeneRemark
3AB01Black3912 No.Size 
4AB01Black405 141 
5AB01Black416DisplayDisplay242Display
6AB01Black423 340 
7AB01Black437 439 
8AB01White3919 543 
9AB01White402  
10AB01White4212DisplayDisplayDisplay
11AB01White4323  
12AB04Blue4243  
13AB04Blue3912  
14AB04Blue412DisplayDisplayDisplay
15AB04Blue4323  
16AB04Red4312  
17AB04Red393DisplayDisplayDisplay
18AD09Silver4323  
19AD09Silver4024DisplayDisplayDisplay
20AD09Silver392  
21AD09Black4112DisplayDisplayDisplay
22AD09Black424  
23AD09Black3923  
24AD09Black436  
25AD09Orange399  
26AD09Orange404  
27AD09Orange427DisplayDisplayDisplay
28AD09Orange434  
29DY777Cream399  
30DY777Cream402  
31DY777Cream431  
32DY777Cream426DisplayDisplayDisplay
33DY777Navy433DisplayDisplayDisplay
34DY777Noir405  
35DY777Noir431  
36DY777Noir423  
37DY777Noir411DisplayDisplayDisplay
38PU888Light Blue415DisplayDisplayDisplay
39PU888Beige427  
40PU888Beige416DisplayDisplayDisplay
41PU888Beige391  
42PU888Green392  
43PU888Green4011DisplayDisplayDisplay
44PT002Black3916  
45PT002Black406  
46PT002Black416DisplayDisplayDisplay
47PT002Blue417DisplayDisplayDisplay
48PT002Blue399  
49PT002Purple4214DisplayDisplayDisplay
50PT002Purple4312  
51PT002Purple399  
52PT002White427  
53PT002White434  
54PT002White4113DisplayDisplayDisplay
55PT002White3915  
Manith
Cell Formulas
RangeFormula
F3:F55F3=IF(MATCH(C3,I$4:I$8,0)=MIN(IF(A$3:A$55=A3,IF(B$3:B$55=B3,MATCH(C$3:C$55,I$4:I$8,0)))),"Display","")
L3:L55L3=LET(f,FILTER(C$3:C$55,(A$3:A$55=A3)*(B$3:B$55=B3)),IF(C3=INDEX(SORTBY(f,MATCH(f,I$4:I$8,0)),1),"Display",""))
Press CTRL+SHIFT+ENTER to enter array formulas.



If there might be items with Qty = 0 in the table, then here is an alternative for that.

23 11 30.xlsm
ABCDF
1
2CodeColorSizeQtyRemark
3AB01Black3912 
4AB01Black405 
5AB01Black410 
6AB01Black423Display
7AB01Black437 
8AB01White3919 
9AB01White402Display
10AB01White420 
11AB01White4323 
12AB04Blue4243 
13AB04Blue3912 
14AB04Blue412Display
15AB04Blue4323 
16AB04Red4312 
17AB04Red393Display
18AD09Silver4323 
19AD09Silver400 
20AD09Silver392Display
21AD09Black4112Display
22AD09Black424 
23AD09Black3923 
24AD09Black436 
25AD09Orange399 
26AD09Orange404 
27AD09Orange427Display
28AD09Orange434 
29DY777Cream399 
30DY777Cream402 
31DY777Cream431 
32DY777Cream426Display
33DY777Navy433Display
34DY777Noir405 
35DY777Noir431 
36DY777Noir423 
37DY777Noir411Display
38PU888Light Blue415Display
39PU888Beige427 
40PU888Beige416Display
41PU888Beige391 
42PU888Green392 
43PU888Green4011Display
44PT002Black3916 
45PT002Black406 
46PT002Black416Display
47PT002Blue417Display
48PT002Blue399 
49PT002Purple4214Display
50PT002Purple4312 
51PT002Purple399 
52PT002White427 
53PT002White434 
54PT002White4113Display
55PT002White3915 
Manith (2)
Cell Formulas
RangeFormula
F3:F55F3=IF(MATCH(C3,I$4:I$8,0)=MIN(IF(D$3:D$55>0,IF(A$3:A$55=A3,IF(B$3:B$55=B3,MATCH(C$3:C$55,I$4:I$8,0))))),"Display","")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Check this and revert -

Book1
ABCDEF
2CodeColorSizeQtyRemarkRemark
3AB01Black3912 
4AB01Black405 
5AB01Black416DisplayDisplay
6AB01Black423 
7AB01Black437 
8AB01White3919 
9AB01White402 
10AB01White4212DisplayDisplay
11AB01White4323 
12AB04Blue4243 
13AB04Blue3912 
14AB04Blue412DisplayDisplay
15AB04Blue4323 
16AB04Red4312 
17AB04Red393DisplayDisplay
18AD09Silver4323 
19AD09Silver4024DisplayDisplay
20AD09Silver392 
21AD09Black4112DisplayDisplay
22AD09Black424 
23AD09Black3923 
24AD09Black436 
25AD09Orange399 
26AD09Orange404 
27AD09Orange427DisplayDisplay
28AD09Orange434 
29DY777Cream399 
30DY777Cream402 
31DY777Cream431 
32DY777Cream426DisplayDisplay
33DY777Navy433DisplayDisplay
34DY777Noir405 
35DY777Noir431 
36DY777Noir423 
37DY777Noir411DisplayDisplay
38PU888Light Blue415DisplayDisplay
39PU888Beige427 
40PU888Beige416DisplayDisplay
41PU888Beige391 
42PU888Green392 
43PU888Green4011DisplayDisplay
44PT002Black3916 
45PT002Black406 
46PT002Black416DisplayDisplay
47PT002Blue417DisplayDisplay
48PT002Blue399 
49PT002Purple4214DisplayDisplay
50PT002Purple4312 
51PT002Purple399 
52PT002White427 
53PT002White434 
54PT002White4113DisplayDisplay
55PT002White3915 
Sheet1
Cell Formulas
RangeFormula
F3:F55F3=IFS(AND(C3=41,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=41)*($D$3:$D$100))>0),"Display", AND(C3<>41,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=41)*($D$3:$D$100))>0),"", AND(C3=42,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=42)*($D$3:$D$100))>0),"Display", AND(C3<>42,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=42)*($D$3:$D$100))>0),"", AND(C3=40,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=40)*($D$3:$D$100))>0),"Display", AND(C3<>40,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=40)*($D$3:$D$100))>0),"", AND(C3=39,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=39)*($D$3:$D$100))>0),"Display", AND(C3<>39,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=39)*($D$3:$D$100))>0),"", AND(C3=43,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=43)*($D$3:$D$100))>0),"Display", AND(C3<>43,SUMPRODUCT(($A$3:$A$100=A3)*($B$3:$B$100=B3)*($C$3:$C$100=43)*($D$3:$D$100))>0),"",TRUE,"")
Thank you so much Sir for your solution.
 
Upvote 0
Given that there are no rows in your sample data with Qty = 0, I assume that if an item has no stock it is removed from the list.

If that is the case and it needs to work in 2019 as well as 2021 then try the formula in column F. I have included another formula in column L in case you decide you can go with just 2021.

23 11 30.xlsm
ABCDEFGHIKL
1
2CodeColorSizeQtyRemarkRemarkDisplay SequeneRemark
3AB01Black3912 No.Size 
4AB01Black405 141 
5AB01Black416DisplayDisplay242Display
6AB01Black423 340 
7AB01Black437 439 
8AB01White3919 543 
9AB01White402  
10AB01White4212DisplayDisplayDisplay
11AB01White4323  
12AB04Blue4243  
13AB04Blue3912  
14AB04Blue412DisplayDisplayDisplay
15AB04Blue4323  
16AB04Red4312  
17AB04Red393DisplayDisplayDisplay
18AD09Silver4323  
19AD09Silver4024DisplayDisplayDisplay
20AD09Silver392  
21AD09Black4112DisplayDisplayDisplay
22AD09Black424  
23AD09Black3923  
24AD09Black436  
25AD09Orange399  
26AD09Orange404  
27AD09Orange427DisplayDisplayDisplay
28AD09Orange434  
29DY777Cream399  
30DY777Cream402  
31DY777Cream431  
32DY777Cream426DisplayDisplayDisplay
33DY777Navy433DisplayDisplayDisplay
34DY777Noir405  
35DY777Noir431  
36DY777Noir423  
37DY777Noir411DisplayDisplayDisplay
38PU888Light Blue415DisplayDisplayDisplay
39PU888Beige427  
40PU888Beige416DisplayDisplayDisplay
41PU888Beige391  
42PU888Green392  
43PU888Green4011DisplayDisplayDisplay
44PT002Black3916  
45PT002Black406  
46PT002Black416DisplayDisplayDisplay
47PT002Blue417DisplayDisplayDisplay
48PT002Blue399  
49PT002Purple4214DisplayDisplayDisplay
50PT002Purple4312  
51PT002Purple399  
52PT002White427  
53PT002White434  
54PT002White4113DisplayDisplayDisplay
55PT002White3915  
Manith
Cell Formulas
RangeFormula
F3:F55F3=IF(MATCH(C3,I$4:I$8,0)=MIN(IF(A$3:A$55=A3,IF(B$3:B$55=B3,MATCH(C$3:C$55,I$4:I$8,0)))),"Display","")
L3:L55L3=LET(f,FILTER(C$3:C$55,(A$3:A$55=A3)*(B$3:B$55=B3)),IF(C3=INDEX(SORTBY(f,MATCH(f,I$4:I$8,0)),1),"Display",""))
Press CTRL+SHIFT+ENTER to enter array formulas.



If there might be items with Qty = 0 in the table, then here is an alternative for that.

23 11 30.xlsm
ABCDF
1
2CodeColorSizeQtyRemark
3AB01Black3912 
4AB01Black405 
5AB01Black410 
6AB01Black423Display
7AB01Black437 
8AB01White3919 
9AB01White402Display
10AB01White420 
11AB01White4323 
12AB04Blue4243 
13AB04Blue3912 
14AB04Blue412Display
15AB04Blue4323 
16AB04Red4312 
17AB04Red393Display
18AD09Silver4323 
19AD09Silver400 
20AD09Silver392Display
21AD09Black4112Display
22AD09Black424 
23AD09Black3923 
24AD09Black436 
25AD09Orange399 
26AD09Orange404 
27AD09Orange427Display
28AD09Orange434 
29DY777Cream399 
30DY777Cream402 
31DY777Cream431 
32DY777Cream426Display
33DY777Navy433Display
34DY777Noir405 
35DY777Noir431 
36DY777Noir423 
37DY777Noir411Display
38PU888Light Blue415Display
39PU888Beige427 
40PU888Beige416Display
41PU888Beige391 
42PU888Green392 
43PU888Green4011Display
44PT002Black3916 
45PT002Black406 
46PT002Black416Display
47PT002Blue417Display
48PT002Blue399 
49PT002Purple4214Display
50PT002Purple4312 
51PT002Purple399 
52PT002White427 
53PT002White434 
54PT002White4113Display
55PT002White3915 
Manith (2)
Cell Formulas
RangeFormula
F3:F55F3=IF(MATCH(C3,I$4:I$8,0)=MIN(IF(D$3:D$55>0,IF(A$3:A$55=A3,IF(B$3:B$55=B3,MATCH(C$3:C$55,I$4:I$8,0))))),"Display","")
Press CTRL+SHIFT+ENTER to enter array formulas.
Your formulas work perfectly.
Thank you so much!
 
Upvote 0
You are welcome. Glad to help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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