Hi everyone,
I am doing some excel analysis for a university assignment, and I would be very grateful of any help on a problem I have.
The analysis basically has 2 data components to it:
The 1st part, is a basic transaction list of shopping items bought through the year. Each transaction's shopping item also has the quantity of that item purchased at that time.
The 2nd part, is a pricing sheet for all the different types of shopping items. The pricing sheet has different prices for different quantities at which the item is purchased.
What I am trying to do is to find the relevant price for shopping item, which depends on not only what the item is, but also the quantity. In point form, it should follow the logic below:
1) Identify the item in the shopping list (worksheet 1) from the list of prices (worksheet 2)
2) Find quantity in the prices worksheet that is closest to the quantity in the shopping list (i.e. where the difference between the quantity on transaction list and the quantity on the pricing sheet by lest magnitude)
3) Pull the price for this "closest quantity"
I have uploaded a worksheet showing the structure of that data.
http://www.megaupload.com/?d=DALNF9LG
I have also actually made an attempt at doing this, and come up with the correct output. But, it seems way too complicated for something which is so simple, so I am hoping one of you excel gurus can help me make it more simpler.
Is there some VB code I need to do this, or can it just be a few simple formulaes?
Many Thanks,
Sam
I am doing some excel analysis for a university assignment, and I would be very grateful of any help on a problem I have.
The analysis basically has 2 data components to it:
The 1st part, is a basic transaction list of shopping items bought through the year. Each transaction's shopping item also has the quantity of that item purchased at that time.
The 2nd part, is a pricing sheet for all the different types of shopping items. The pricing sheet has different prices for different quantities at which the item is purchased.
What I am trying to do is to find the relevant price for shopping item, which depends on not only what the item is, but also the quantity. In point form, it should follow the logic below:
1) Identify the item in the shopping list (worksheet 1) from the list of prices (worksheet 2)
2) Find quantity in the prices worksheet that is closest to the quantity in the shopping list (i.e. where the difference between the quantity on transaction list and the quantity on the pricing sheet by lest magnitude)
3) Pull the price for this "closest quantity"
I have uploaded a worksheet showing the structure of that data.
http://www.megaupload.com/?d=DALNF9LG
I have also actually made an attempt at doing this, and come up with the correct output. But, it seems way too complicated for something which is so simple, so I am hoping one of you excel gurus can help me make it more simpler.
Is there some VB code I need to do this, or can it just be a few simple formulaes?
Many Thanks,
Sam