How to cut screws from an Excel Stock with a SolidWorks BOM?

Hi all! Let me explain my question:

I am in charge of creating the nomenclatures of the machines that we design in our company.

My objective is to create a link between the outgoing solidworks BOMs, with my Excel table including all the screws (Type / Ø / Length / Material / Supplier / QUANTITY) present in my stock.

I don't know if I made myself understood well but in plain English it would give its:

Machine "X": TH M6x10 Screw (x10)  /  M6 Nut (x10)

==> Stock table (Excel): Automatically remove the emblem of the screws according to a command of x4 Machine "X".

I look forward to your answers! :)

1 Like

Bill of Materials - Save to Excel File

 Applies to BOMs in Excel format.

To save a bill of materials to an Excel file:

  1. Click the BOM on the drawing sheet.

  2. Click File , Save As.

  3. Enter a file name and click Save.

You can use the BOM saved in Excel or use it as an OLE object in other applications. The saved file is not chained to the BOM in the drawing; the editions of one do not affect the other.

Hey! Thank you for this 1st answer.

But it doesn't entirely answer my problem:

Once I have saved my BOM in Excel format, how do I manage to SUBTRACT this BOM from my existing Excel STOCK file?

For example if in my nomenclature I have - TCHC M6x4 screws (x4)

I would like the subtraction to be done automatically in my Excel Stock table.

 

if in your stock sheet

The  quantities of cells are fixed in boxes specific to a product ref

if in your debit sheet

The  quantities of cells are fixed in boxes specific to a product ref

nothing prevents you from making a link of these cells and creating a subtraction operation

via the appropriate formulas

@+

 

2 Likes

Hello

You have to create a macro, do you know the VBA language?

Well my problem now is that I don't see at all how to make the link between my Stock / Debit cells knowing that they are located on two separate excel files. Something I'd like to keep in this form (with an Excel Stock and an Excel Nomenclature)

In any case, it's cool to look into my problem, thank you! :)

 

1 Like

See this link

http://www.excel-online.net/liaisons.html

How to build links:

Creating a link between two sheets or between two binders is actually very simple. In fact, every time you create a formula by inserting references into it, you make connections between different cells. But we are not talking about links as such, because the different references are on the same sheet. When you start a formula (with the = sign ) and point to a cell in another sheet (by selecting the sheet with the tab), the link is created automatically. The difference you will notice in the formula is the appearance of the name of the sheet that has been linked (source sheet) next to the reference. An example: =D5*PRICE! D7.

Here's an example of a link between two sheets in the same workbook:

In  this Excel workbook there are 2 sheets ("Exchange Rate" and "Conversion")

In the "Exchange rates" sheet there is a table containing rates for different currencies.

In the "Conversion" sheet we will create formulas to calculate the price in local currency, directly using the respective rate found in the "Exchange Rates" sheet . In our example, the rate for Italian lira. The "Exchange Rate" sheet is the source sheet in this case .

In the "Conversion" sheet   (destination sheet) we will create the formula. To convert in this case you will have to multiply the price in Italian Lira (LIT) by the respective rate in the other sheet. The following image illustrates the formula.

 N.B. The expression 'Exchange Rate'! Indicating the sheet name of the linked cell is automatically added to the formula.
To validate the formula, press <Enter> after selecting the cell to link, this automatically returns you to the destination sheet.

[Back to Top]


Links between workbooks:

You can also link data that is in different workbooks. The principle for creating a link between workbooks is the same as for sheets, with the difference that you will have to look for the cell to be linked by going through the Window menu to display the source sheet.

When you create bindings between workbooks, the Bindings ...  in the Edit menu activates

This command opens the following dialog box that allows you to open the source file, change the source of the link, or update the link.

Be careful when moving an Excel workbook that contains S bindings
2 Likes

Thank you for the link but I can't do exactly what I want.

I would like to make the link between two Quantity columns (Stock file / Debit file) so that Excel automatically knows how to find the corresponding references (Vis TH or TCLZ) between stock and debit. As soon as the references match, the subtraction can take place.

Attached is an example of the Stock table with the screws present in the Excel BOM file (Solidworks) in yellow.


capturem.jpg

I don't understand what your painting is for either

The link is cells and not columns on Exell

It's up to you to create the links between the cells either in the same sheet / different sheet or different workbook

And it's this link from box to CSE that will allow you to do your desired operations

so the squares must always remain in the same place

Post your Exell part BOM

Post your Exell stock sheets

Your pice quantity are in very distinct boxes

so from these very distinct boxes you create your links

Hello

@gt22 gives you the right solution.

However, this does require knowing how to master Excel formulas.

You can do anything you want with Excel or even better Access whose in cells put conditions with multiple nests in a cell including cell A123 which is in the sheet quichemolle_V12 . You can even do even more Sioux stuff with VBA in excel.

I love the IF Then, it's what keeps you cool.

1 Like