I need a macro to compare two excel files called old pricing & new pricing, on column c on both spreadsheets it has a column name alu. I need the macro to match alu (data below the alu column) for each spreadsheet. There will also be on column f (cost) and column g (price). If the alu matches it will do several functions.
1) it will only copy from old pricing to new pricing if new cost & price = 0 or blank.
2) it won't copy if new pricing already has a price for cost or price above 0
3) it will only change new pricing and not change old pricing
4) Pull from a file and not a worksheet
4) The result will be new pricing changed if the following criteria above is followed
Example: Is attached (Note: attached example on the tab old pricing & new pricing should be two separate files) Also the result is just an example of the replaced new pricing should be.
based on the result tab on the attached file example
On the result old pricng f2 & g2 replace new pricing f2 & G2 because they were 0's. On the result old pricing f3 & G3 were 0's so it didn't replace f3 & g3 pricing on new pricing and new pricing already had a price above 0 so it stayed the same and no change. On the result old pricing f4 & g3 because new pricing already had pricing above 0 the pricing stayed the same even though there were different prices from the old pricing.
So the bottom line is if there is a 0 or blank on new pricing and the old pricing has a price above 0 then change it. If old pricing has a price and new pricing has a price don't change it because new pricing is above 0 already. (blank is = 0, and new pricing is all that need to be changed)
i had someone help me on another forum, we came close but just didn't quite get it.
i appreciate any help, and thanks in advance
Bookmarks