Bloacksheep
New Member
- Joined
- Feb 3, 2009
- Messages
- 3
Hi folks,
I work in a manufacturing company where all parts have an assigned part number (basically treated as text) and a cost. We update part costs on some but not all parts every three months. The lists only contain that parts that were quoted that quarter. Every quarter, I need to determine the costs of our products. So I take the parts list for each product and I need to look in all three lists and grab the most recent quote for each part in the products. I can then sum the costs together for the parts in each product.
So I now have three lists that have part cost quotes for the last three quarters (no further back). If there are three quotes, I take the most recent quote. If there is only one quote and it is three quarters back, I use that quote. Essentially, the most recent quote has precedence over all others. The quotes are on separate worksheets.
I am struggling with the best way to do this. I have a set of array function that appear to be doing what I want, but they appear pretty ugly. Basically, I use three columns to check for a part quote in each of the three lists (I trap the NAs and make them 0). Then I use a fourth column to pick the most recent non-zero quote of the three columns.
It seems like a complicated solution. Any ideas for a simpler one?
I work in a manufacturing company where all parts have an assigned part number (basically treated as text) and a cost. We update part costs on some but not all parts every three months. The lists only contain that parts that were quoted that quarter. Every quarter, I need to determine the costs of our products. So I take the parts list for each product and I need to look in all three lists and grab the most recent quote for each part in the products. I can then sum the costs together for the parts in each product.
So I now have three lists that have part cost quotes for the last three quarters (no further back). If there are three quotes, I take the most recent quote. If there is only one quote and it is three quarters back, I use that quote. Essentially, the most recent quote has precedence over all others. The quotes are on separate worksheets.
I am struggling with the best way to do this. I have a set of array function that appear to be doing what I want, but they appear pretty ugly. Basically, I use three columns to check for a part quote in each of the three lists (I trap the NAs and make them 0). Then I use a fourth column to pick the most recent non-zero quote of the three columns.
It seems like a complicated solution. Any ideas for a simpler one?