I have the folowing code in a macro:
Range("M2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC1,MRPDet,8,0)"
The problem is that sometimes the data in not in column 8. It could be in columns 6, 7 or 8. How do I compensate? The named range for the column I want to use is called Sales_Order.
Range("M2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC1,MRPDet,8,0)"
The problem is that sometimes the data in not in column 8. It could be in columns 6, 7 or 8. How do I compensate? The named range for the column I want to use is called Sales_Order.