Yet another question (and I hope I have more for today ^^).
This time it is some 3D solidworks parts whose material has not been filled in. The problem is that in the nomenclature it shows me the following field "Material <not specified>", I would like it to show me an empty box instead.
While searching in the SmartBom help, I came across this:
The "IIF" syntax can be used in uppercase or lowercase "iff". The character "|" is obtained by combining the "AltGr" and "6" keys. To retrieve a property, place the "$" character in front of the property name (case sensitive).
Example : IFF($Mati era=Steel|Polishing|Painting)
If the "Material" property is equal to "Steel" then the column cell will be equal to "Polishing" otherwise the column cell will be equal to "Paint".
So I think I need a formula like this: If the "Material" property is equal to "Material" then the column cell will be equal to "Material" (the value of the material entered in solidworks in fact) otherwise the column cell will be equal to "".
As I don't know in which column the matter is, just replace the number 5 after the equal sign of the 2nd line (Colonne_Matiere = 1 for A, 2 for B etc...)
Here is the macro for the Excel file:
Sub matter() Colonne_Matiere = 5' column E = 5 der_ligne = Range("a9999"). End(xlUp). Row A = 0 For i = 1 TB der_ligne If Cells(i, Colonne_Matiere) = "Material <not specified>" Then Cells(i, Colonne_Matiere) = "" A = A + 1 End If Next i MsgBox "Processing completed: & A & " replacement(s) made." End Sub