How to return cell values from one sheet to another if cell is not blank and go to next one and again

missrutele

New Member
Joined
Nov 17, 2017
Messages
10
I have 3 sheets with listed different models there you can indicated how many you need of which model (~300 models). I need to use a formula in another sheet that check these sheets and if cell is not blank (quantity indicated), return information to main sheet (order sheet) - name, barcode and quantity.

For example with smaller amount of models:

in model sheet I have such information and I choose item and indicated needed quantity in column C

BarcodeNameQuantity
022677030104 item1
022677280431Item22
022677271934Item31
024777670679Item4

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Than in main sheet i need that information would be like this (would shown just ordered goods)

itemBarcode Order
Item20226772804312
Item30226772719341

<colgroup><col span="2"><col></colgroup><tbody>
</tbody>


Please someone help :)
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Excel 2010
ABC
1BarcodeNameQuantity
222677030104item1
322677280431Item22
422677271934Item31
524777670679Item4
model



Cell Formulas
RangeFormula
A2{=IF(ROWS(A$2:A2)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A2))))}
A3{=IF(ROWS(A$2:A3)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A3))))}
A4{=IF(ROWS(A$2:A4)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A4))))}
A5{=IF(ROWS(A$2:A5)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A5))))}
A6{=IF(ROWS(A$2:A6)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A6))))}
A7{=IF(ROWS(A$2:A7)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A7))))}
A8{=IF(ROWS(A$2:A8)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A8))))}
A9{=IF(ROWS(A$2:A9)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A9))))}
A10{=IF(ROWS(A$2:A10)>COUNTA(model!$C$2:$C$5),"",INDEX(model!A$2:A$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(A$2:A10))))}
B2{=IF(ROWS(B$2:B2)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B2))))}
B3{=IF(ROWS(B$2:B3)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B3))))}
B4{=IF(ROWS(B$2:B4)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B4))))}
B5{=IF(ROWS(B$2:B5)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B5))))}
B6{=IF(ROWS(B$2:B6)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B6))))}
B7{=IF(ROWS(B$2:B7)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B7))))}
B8{=IF(ROWS(B$2:B8)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B8))))}
B9{=IF(ROWS(B$2:B9)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B9))))}
B10{=IF(ROWS(B$2:B10)>COUNTA(model!$C$2:$C$5),"",INDEX(model!B$2:B$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(B$2:B10))))}
C2{=IF(ROWS(C$2:C2)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C2))))}
C3{=IF(ROWS(C$2:C3)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C3))))}
C4{=IF(ROWS(C$2:C4)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C4))))}
C5{=IF(ROWS(C$2:C5)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C5))))}
C6{=IF(ROWS(C$2:C6)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C6))))}
C7{=IF(ROWS(C$2:C7)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C7))))}
C8{=IF(ROWS(C$2:C8)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C8))))}
C9{=IF(ROWS(C$2:C9)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C9))))}
C10{=IF(ROWS(C$2:C10)>COUNTA(model!$C$2:$C$5),"",INDEX(model!C$2:C$5,SMALL(IF(model!$C$2:$C$5<>"",ROW(model!$A$2:$A$5)-ROW(model!$A$2)+1),ROWS(C$2:C10))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you, that works.

One problem if I have to collect these data from few different sheets how I should merge it in one formula, with + or OR??

Thank you for your help :)
 
Upvote 0
Thank you, that works.

One problem if I have to collect these data from few different sheets how I should merge it in one formula, with + or OR??

Thank you for your help :)
 
Upvote 0
For that I would probable use VBA code or maybe power query.
 
Upvote 0

Forum statistics

Threads
1,215,132
Messages
6,123,227
Members
449,091
Latest member
jeremy_bp001

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