The VBA code for attached looks at ‘Item’ & ‘Qty’ per record on QUOTES sheet. Then in the ‘Formulas’ sheet, it looks up corresponding ‘Price1’, ‘Price2’, ‘Price3’, ‘Price4’ for that item & quantity range and pastes these values in respective columns J-M of QUOTES sheet. [For example, when it looks for the ‘Qty’, it’s looking at a range that the record’s quantity falls within; for instance, ‘66’ of first record does not fall within any quantity break as ‘100’ is the minimum published quantity for the item (‘RP7’) at the ‘Formulas’ sheet, therefore per the code it returns a default value of “(Call for quote)”. For the next record, the quantity is 1250, so it looks at the item (‘TY16’) & determines that the quantity falls under the ‘1000’ quantity break and uses those Price1/2/3/4 values to paste in QUOTES sheet.] What I’m wanting to add to the QUOTES sheet in the ‘DiscCode’ column for each record is the contents of the cell right above the quantity break (the single letter). For any records that are ‘less than minimum’ (like the first record of qty 66, which is less than the lowest quantity break of 100 for that item) or for any item not found in the ‘Formulas’ list (like ‘Custom Calendar’, etc.), the value for ‘DiscCode’ should be blank. So for the first record, it would be blank. For the second record, it would paste letter “D” (because it’s quantity of 1250 gets a price from the ‘1000’ quantity break, and “D” is in the cell right above the ‘1000’ cell). For the third record, it would paste “C” and so on. Thanks for having a look at this and any help you can offer!
Bookmarks