Skip to Content
May 06, 2020 at 06:25 AM

VBA Code for comparing 2 material excel codes with material SAP code using VBA

115 Views Last edit May 06, 2020 at 07:25 AM 2 rev


i am new member coming to group.

i have a question. i need to add some material code is alt code in SAP BOM but in BOM did not display material code exist or not when i searched it in BOM.

so i want to compare material excel code with first material SAP code after i searched it in BOM. If it's the same then save it and don't do anything. If it's different then do the next steps.

as attachment:

step 1: i need to add red code in to BOM

step 2: i searched code in BOM to check.

Step 3: copy red code in SAP BOM and compare it with excel file step 1, if it the same code then save it and don't do anything.

if it's different then do next steps.

can u help me, how can do it using VBA?