Sort latest Data

someone21

Board Regular
Joined
Sep 16, 2011
Messages
71
Based on the table below, I need two tasks.

1. Sort out the data descending for dates
2. Have a way so that I can only retrieve the latest information.
Meaning if I ask for Pen, I should only get a value of X
Similarly for XYZ, I should only get a value of N





<table style="padding-right: 2pt; padding-left: 2pt; font-size: 11pt; font-family: Calibri,Arial; background-color: rgb(255, 255, 255); width: 235px; height: 197px;" border="1" cellpadding="0" cellspacing="0"><colgroup> <col style="FONT-WEIGHT: bold; WIDTH: 30px"> <col style="WIDTH: 64px"> <col style="WIDTH: 64px"></colgroup> <tbody> <tr style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"> <td> Date
</td> <td>A</td> <td>B</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">
</td> <td style="BACKGROUND-COLOR: #99cc00">Types
</td> <td style="BACKGROUND-COLOR: #99cc00">Value</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5 Oct</td> <td>Pen</td> <td style="TEXT-ALIGN: right">X</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5 Oct</td> <td>Pencil</td> <td style="TEXT-ALIGN: right">Y</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5 Oct</td> <td>Pencil</td> <td style="TEXT-ALIGN: right">H</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><table style="width: 42px; height: 20px;" border="1" cellpadding="0" cellspacing="0"><tbody><tr><tr style="HEIGHT: 18px"><td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4 Oct</td></tr></tr></tbody></table></td> <td>Glue
</td> <td style="TEXT-ALIGN: right">Q</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1 Oct
</td> <td>Pen</td> <td style="TEXT-ALIGN: right">N</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">27 Sep
</td> <td>Glue</td> <td style="TEXT-ALIGN: right">T</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2 Sep
</td> <td>XYZ</td> <td style="TEXT-ALIGN: right">N</td></tr> <tr style="HEIGHT: 18px"> <td style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2 Sep
</td> <td>XYZ</td> <td style="TEXT-ALIGN: right">X</td></tr></tbody></table>
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,552
Messages
6,179,484
Members
452,917
Latest member
MrsMSalt

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