Show all items on the sheet/compared to SQL data?

afc171

Board Regular
Joined
Jan 14, 2017
Messages
145
Office Version
  1. 2013
Platform
  1. Windows
Hi all,

I have two sheets, one (Despatch-LC-Stock) which pulls stock from external SQL.
On another sheet (ProductList) I have a list of all products.
On Despatch-LC-Stock this will sometimes have multiple products of the same item in it, as some are different batch/lot numbers.

What I would like is a sheet which shows all products with batches and show items which are not in stock with a 0 or none in stock. Not sure how I would do this?!

any help would be great.

4Despatch Consumables V1 (1).xlsm
BCDEFGH
2productlong_descriptionlot_numberbin_numberquantityinspection_dateexpiry_date
3GEN0023Azowipes15278LC14COSH820/Jun/202231/May/2024
4GEN0023Azowipes15852LC14COSH1929/Jul/202230/Jun/2024
5GEN0023Azowipes15959LC14COSH2026/Aug/202230/Jun/2024
6PKG0001BUF BOX 120 X 79 X 60MM300421LC/P813530/Apr/2021
7PKG0001BUF BOX 120 X 79 X 60MM260422LC/P8182126/Apr/2022
8PKG0002CARDICE 11.5KG BAG 10MM PELLETS051022KD80305/Oct/2022
9PKG0003BUF BOX SLEEVES LIT.BUF170566KSCLC/P829427/May/2021
10PKG0004BOVINE KIT SLEEVE LIT.KIT BOV090719LC/P86809/Jul/2019
11PKG0004BOVINE KIT SLEEVE LIT.KIT BOV031019LC/P815403/Oct/2019
12PKG0005ICT KIT SLEEVE LIT.KIT PACK031019LC/P831203/Oct/2019
13PKG0006MMT/RMT KIT SLEEVE LIT.MMT169162LCLC/P894930/Sep/2020
14PKG0007MED DRY ICE BOX 283X283X259MM041022LC/P86004/Oct/2022
15PKG0008SINGLE WALL BROWN BOX 305X228X130MM L25170367KSCLC/P81422/Apr/2021
16PKG0008SINGLE WALL BROWN BOX 305X228X130MM L25211021LC/P810021/Oct/2021
17PKG0009DOUBLE WALL BROWN BOX 305X305X305MM L49167212KSCLC/P87101/Oct/2019
18PKG0010A4 PLAIN DOC ENCLOSED WALLETS 1000/BOX150720LC/P8300015/Jul/2020
Despatch-LC-Stock
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:I70Expression=ROW(B3)=HighlightStocktextNO


4Despatch Consumables V1 (1).xlsm
ABCD
2productlong_descriptionstock unitBook Out QTY
3GEN0023AzowipesEACH1 EACH
4GEN0030Absorbent Spill MatEACH1 EACH
5PKG0001BUF BOX 120 X 79 X 60MMEACH1 EACH
6PKG0002CARDICE 11.5KG BAG 10MM PELLETSEACH1 EACH
7PKG0003BUF BOX SLEEVES LIT.BUFEACH1 EACH
8PKG0004BOVINE KIT SLEEVE LIT.KIT BOVEACH1 EACH
9PKG0005ICT KIT SLEEVE LIT.KIT PACKEACH1 EACH
10PKG0006MMT/RMT KIT SLEEVE LIT.MMTEACH1 EACH
11PKG0007MED DRY ICE BOX 283X283X259MMEACH1 EACH
12PKG0008SINGLE WALL BROWN BOX 305X228X130MM L25EACH1 EACH
13PKG0009DOUBLE WALL BROWN BOX 305X305X305MM L49EACH1 EACH
14PKG0010A4 PLAIN DOC ENCLOSED WALLETS 1000/BOXEACH1 (BOX 1000)
ProductList
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Do you mean something like below?
I have created this is PowerQuery by merging both tables, keeping all records from table2.

1665043326712.png


/Skovgaard
 
Upvote 0
Hi Skovgaard
Yes looks good as it shows items not in stock. I created something similar but how to merge both tables?
If i added a manual column on the end would it still align if something came into stock?

Thank you
 
Upvote 0
Hi Skovgaard
Yes looks good as it shows items not in stock. I created something similar but how to merge both tables?
If i added a manual column on the end would it still align if something came into stock?

Thank you

See below picture, how I merged the two tables.
Does this help you?

1665047886315.png


/Skovgaard
 
Upvote 0
I don't think I have that menu as we are on Office 2013
 
Upvote 0
I don't think I have that menu as we are on Office 2013

Sorry, I didn't pay attention to your version.
I can't think of another way, than I already tried with merging - Perhaps other users have a solution.

Power Query is available as an add-in for 2013, see below site


/Skovgaard
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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