Hello again!

I am working on an inventory sort/spread macro, and am trying to make it as user-friendly as possible for my boss, but I'm having a problem with a bit of code. I want the macro to run ONLY if certain Column Headers are present on the worksheet (in this case, "MPN" and "Inventory Number"), and if they are, I want to use those found column headers as Sort Keys. I currently have this:

Formula: copy to clipboard
Please Login or Register  to view this content.


I'm still rusty on addresses and defining ranges, so I'm sure I don't have the Key1 and Key2 formatting right, as it gives me a "THE FORMULA YOU TYPED HAS AN ERROR" code. Can anyone assist me?