Excel help needed. how to select the last entry by date and type

leerobs

New Member
Joined
Sep 1, 2017
Messages
1
I have data which I desperately need to analyze and I'm at a loss as to how to proceed. The data is in three columns; the first is date. The dates are not in order (for various reasons) and new data is just added to the bottom of the list. I also have the selling price of a product in the second column and the type of product in the third. For example:

Calculations must be based on the seven most recent prices of any one type. The 3rd lowest price and 2nd highest price go into the table starting with Cells “A” (<code style="margin: 0px; padding: 1px 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">F12</code>) and “B” (<code style="margin: 0px; padding: 1px 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">G12</code>), respectively.
The third formula should eliminate (ignore) the highest and lowest of the seven most recent prices, and calculate the average of the remaining five prices. This goes in the last column of the table, starting with Cell “C” (<code style="margin: 0px; padding: 1px 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">H12</code>).
Then I need a combined bar/line graph with "type" on the horizontal axis and "price" on the vertical. I need a stacked bar graph showing the lower range (Cell “A”) and higher range (Cell “B”), and a line graph is to be overlaid with the averages (Cell “C”).
I'm not an Excel wizard, and I've tried every self-help tutorial I can to work this out. I’ve gotten as far as thinking that <code style="margin: 0px; padding: 1px 5px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">VLOOKUP</code> may be useful, but I'm now at a loss.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,755
Messages
6,126,683
Members
449,328
Latest member
easperhe29

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top