Hi Darwin, welcome to TSG.
I'm sorry to say but I think this is insufficient information. More details are needed. It's difficult to say anything without understanding the project you work on. For example, what is "most recent price"? I came up with the following possible definitions:
1) You keep records of prices for each item in the Master Part List, and want the most recent price of a particular item.
2) You want the price that was most recently entered into the database.
3) You want the price of a particular part that the most recent puchase was made at.
4) You want the full price that the most recent puchase was made at.
You see? Any of the above, and possibly more, could be the one you want, but they need different approach, each. The best I can do, without trying to cover more possibilities than I see point in at the moment, is this:
The lowest price on the master sheet can be found by using the MIN function.
Search for most recent price is done with the MAX function, using dates related to prices.
Search for a particular vendor, item, price, etc. is done with the MATCH function.
All 3 functions can be used in VBA macro with the following syntax:
e.g.
Creating a button in advance is a piece of cake. Creating it runtime is a bit more difficult. Creating it runtime and assigning a macro to it, also in runtime, so that it would work, well, I haven't been able to do that so far.
Jimmy
I'm sorry to say but I think this is insufficient information. More details are needed. It's difficult to say anything without understanding the project you work on. For example, what is "most recent price"? I came up with the following possible definitions:
1) You keep records of prices for each item in the Master Part List, and want the most recent price of a particular item.
2) You want the price that was most recently entered into the database.
3) You want the price of a particular part that the most recent puchase was made at.
4) You want the full price that the most recent puchase was made at.
You see? Any of the above, and possibly more, could be the one you want, but they need different approach, each. The best I can do, without trying to cover more possibilities than I see point in at the moment, is this:
The lowest price on the master sheet can be found by using the MIN function.
Search for most recent price is done with the MAX function, using dates related to prices.
Search for a particular vendor, item, price, etc. is done with the MATCH function.
All 3 functions can be used in VBA macro with the following syntax:
Code:
Result = Application.WorksheetFunction.FunctionName(parameter list)
Code:
Result = Application.WorksheetFunction.Match(what, where, how)
Jimmy