A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Here is the link to the wetransfer documents https://we.tl/t-7d1ZrUWicC
Sorry this was so long. I wanted to make sure you understood exactly what my overall goal was.
Everything is fine, without your detailed explanation nobody outside of your company would understand it.
There are a few problems to be clarified and unfortunately I have to say in advance that IMHO it will not work in this way with the existing data.
Okay, let's start with an Invoice, I tried to enter "B070-31" in the Invoice file, but your file wont let me. A short look, problem solved, here's the data I entered:
| Qty | Manufacturer | Item | Amount | |
|---|---|---|---|---|
| 3 | Ashley | B070-31 Dresser | 207 | 621 |
| 2 | Albion | Q H/O Rails | 26 | 52 |
Problem a)
How should the Invoice file know that "B070-31 Dresser" can be found in "Ashley Bedroom.xlsm" and not in "Ashley Stationary.xlsm"?
I can guess that every manufacturer has it own file, but how they are named?
Maybe there's an "Kitchen Ashley.xlsm" file anywhere? In which file is the item "B123-99 Knife"?
That can not be automated by a code.
Problem b) If we take a look into "Ashley Bedroom.xlsm" we can find
| Status | Series | SKU |
|---|---|---|
| B070 | 31 |
That would mean the code has to split "B070-31 Dresser" by "-" to get the Series and by " " to get the SKU and skip the remaining part "Dresser". Possible but what do we get for the next item "Q H/O Rails"?
There is no "-" in there, okay we can use any symbol as delimiter and that leads to "Q" as Series and "H" as SKU... i bet that can't be found in file "Albion Whatever.xlsm". Am I right?
Problem c)
Let us take a look into "Washington Brothers.xlsm" and compare the headings in row 5 with "Ashley Bedroom.xlsm"
| Status | Series | SKU | Damaged | Floor | Warehouse | Available | On Order | Keep | Needed |
|---|---|---|---|---|---|---|---|---|---|
| Series | SKU | Damaged | Floor | Stock | Available | On Order | Keep | Needed |
They are no the same, especially there is no "Stock" in there, I can guess that "Warehouse" should mean the same...
Automation means that a process is always the same, but this only works if the data structure is always the same. And you don't have that in any way, sorry.
It all looks similar enough for a human and if I would know your job I can work with your files, no question. But VBA is like a blind man, it can't see anything.
In order to establish a secure process here, the data would have to be restructured in such a way that it is the same in all files. That means days or weeks of work. And then you would still have to write and test all the code.
All this is my opinion, let's see what Jeovany has to say about it.
Andreas.