Hi,
I need to reference the specific site name on column B, find out which entry for that site is the most recent from column A and return the value in C (whether it is "cleared" or "raised").
There will be duplicates in Column B (Source) but I am only interested in what the most recent status change was using columns A (Time) and C (Message).
[TABLE="width: 1023"]
<colgroup><col width="262" style="width: 197pt; mso-width-source: userset; mso-width-alt: 9581;"> <col width="529" style="width: 397pt; mso-width-source: userset; mso-width-alt: 19346;"> <col width="572" style="width: 429pt; mso-width-source: userset; mso-width-alt: 20918;"> <tbody>[TR]
[TD="class: xl65, width: 262, bgcolor: transparent"]Time
[/TD]
[TD="width: 529, bgcolor: transparent"]Source[/TD]
[TD="width: 572, bgcolor: transparent"]Message[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:24[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:22[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:21[/TD]
[TD="bgcolor: transparent"]Field Road SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:18[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"] raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:14[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:12[/TD]
[TD="bgcolor: transparent"]SX_HOW CORNER SYDENHAM SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:07[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:03[/TD]
[TD="bgcolor: transparent"]SX_RADLEY EAST HAGBOURNE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]DAUGHTER LANE SPS.GENERATOR [/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
</tbody>[/TABLE]
Returning something like this;
[TABLE="width: 826"]
<colgroup><col width="529" style="width: 397pt; mso-width-source: userset; mso-width-alt: 19346;"> <col width="572" style="width: 429pt; mso-width-source: userset; mso-width-alt: 20918;"> <tbody>[TR]
[TD="width: 529, bgcolor: transparent"]Source[/TD]
[TD="width: 572, bgcolor: transparent"]Last status[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
</tbody>[/TABLE]
Any help would be appreciated!
[TABLE="width: 909"]
<colgroup><col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;"> <col width="529" style="width: 397pt; mso-width-source: userset; mso-width-alt: 19346;"> <col width="572" style="width: 429pt; mso-width-source: userset; mso-width-alt: 20918;"> <tbody>[TR]
[TD="width: 111, bgcolor: transparent"]Time[/TD]
[TD="width: 529, bgcolor: transparent"]Source[/TD]
[TD="width: 572, bgcolor: transparent"]Message[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:24[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:22[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:21[/TD]
[TD="bgcolor: transparent"]Field Road SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:18[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"] raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:14[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:12[/TD]
[TD="bgcolor: transparent"]SX_HOW CORNER SYDENHAM SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:07[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:03[/TD]
[TD="bgcolor: transparent"]SX_RADLEY EAST HAGBOURNE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]DAUGHTER LANE SPS.GENERATOR [/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
</tbody>[/TABLE]
I need to reference the specific site name on column B, find out which entry for that site is the most recent from column A and return the value in C (whether it is "cleared" or "raised").
There will be duplicates in Column B (Source) but I am only interested in what the most recent status change was using columns A (Time) and C (Message).
[TABLE="width: 1023"]
<colgroup><col width="262" style="width: 197pt; mso-width-source: userset; mso-width-alt: 9581;"> <col width="529" style="width: 397pt; mso-width-source: userset; mso-width-alt: 19346;"> <col width="572" style="width: 429pt; mso-width-source: userset; mso-width-alt: 20918;"> <tbody>[TR]
[TD="class: xl65, width: 262, bgcolor: transparent"]Time
[/TD]
[TD="width: 529, bgcolor: transparent"]Source[/TD]
[TD="width: 572, bgcolor: transparent"]Message[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:24[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:22[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:21[/TD]
[TD="bgcolor: transparent"]Field Road SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:18[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"] raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:14[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:12[/TD]
[TD="bgcolor: transparent"]SX_HOW CORNER SYDENHAM SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:07[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:03[/TD]
[TD="bgcolor: transparent"]SX_RADLEY EAST HAGBOURNE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]DAUGHTER LANE SPS.GENERATOR [/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
</tbody>[/TABLE]
Returning something like this;
[TABLE="width: 826"]
<colgroup><col width="529" style="width: 397pt; mso-width-source: userset; mso-width-alt: 19346;"> <col width="572" style="width: 429pt; mso-width-source: userset; mso-width-alt: 20918;"> <tbody>[TR]
[TD="width: 529, bgcolor: transparent"]Source[/TD]
[TD="width: 572, bgcolor: transparent"]Last status[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
</tbody>[/TABLE]
Any help would be appreciated!
[TABLE="width: 909"]
<colgroup><col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;"> <col width="529" style="width: 397pt; mso-width-source: userset; mso-width-alt: 19346;"> <col width="572" style="width: 429pt; mso-width-source: userset; mso-width-alt: 20918;"> <tbody>[TR]
[TD="width: 111, bgcolor: transparent"]Time[/TD]
[TD="width: 529, bgcolor: transparent"]Source[/TD]
[TD="width: 572, bgcolor: transparent"]Message[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:29[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:24[/TD]
[TD="bgcolor: transparent"]WN_MANOOD CLOSE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:22[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:21[/TD]
[TD="bgcolor: transparent"]Field Road SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:18[/TD]
[TD="bgcolor: transparent"]Farley 3 SPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"] raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:14[/TD]
[TD="bgcolor: transparent"]CW_PAWS FARM SPS.Logic.Communication State[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:12[/TD]
[TD="bgcolor: transparent"]SX_HOW CORNER SYDENHAM SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:07[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]raised[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:03[/TD]
[TD="bgcolor: transparent"]SX_RADLEY EAST HAGBOURNE SPS.WET WELL[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]PerchField Sarsden Halt TSPS.Digital.Wet Well[/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent, align: right"]31/08/2017 09:00[/TD]
[TD="bgcolor: transparent"]DAUGHTER LANE SPS.GENERATOR [/TD]
[TD="bgcolor: transparent"]cleared[/TD]
[/TR]
</tbody>[/TABLE]