How to return the latest column with a value - if D 0, go to C and return the date of that corresponding column

Ultraboost

New Member
Joined
Mar 30, 2019
Messages
3
[TABLE="width: 500"]
<tbody>[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]20/10/2015[/TD]
[TD]10.5[/TD]
[TD]19/10/2016[/TD]
[TD]8[/TD]
[TD]20/10/2018[/TD]
[TD]8.2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]30/1/2016[/TD]
[TD]9.5[/TD]
[TD]20/3/2017[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10/2/2010[/TD]
[TD]7.4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Hello, I am trying to find the latest result of a blood test. I have two repeating columns in the data - the Follow up date and then the result (stretching for 10ish columns). I want to start the result to show the number in the latest column e.g. F2 and if blank, go to D2 and return the latest result AND the corresponding date at an adjacent column (otherwise I won't have any idea which date it is from).

Is there a way to actually do this in the normal excel or do I need to 'make' some tools? I am a beginner but an eager learner.


Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Use this

<b>Sheet</b><br /><br /><table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:75px;" /><col style="width:51px;" /><col style="width:75px;" /><col style="width:51px;" /><col style="width:75px;" /><col style="width:51px;" /><col style="width:39px;" /><col style="width:51px;" /><col style="width:39px;" /><col style="width:51px;" /><col style="width:35px;" /><col style="width:31px;" /><col style="width:123px;" /><col style="width:124px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td><td >J</td><td >K</td><td >L</td><td >M</td><td >N</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">DATE</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">RESULT</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">DATE</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">RESULT</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">DATE</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">RESULT</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">DATE</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">RESULT</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">DATE</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">RESULT</td><td style="font-weight:bold; "> </td><td style="font-weight:bold; "> </td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">LATEST DATE</td><td style="background-color:#92d050; font-weight:bold; text-align:center; ">LATEST RESULT</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="text-align:right; ">20/10/2015</td><td style="text-align:right; ">10.5</td><td style="text-align:right; ">19/10/2016</td><td style="text-align:right; ">8</td><td style="text-align:right; ">20/10/2018</td><td style="text-align:right; ">8.2</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td style="text-align:right; ">20/10/2018</td><td style="text-align:right; ">8.2</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="text-align:right; ">30/01/2016</td><td style="text-align:right; ">9.5</td><td style="text-align:right; ">20/03/2017</td><td style="text-align:right; ">7</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td style="text-align:right; ">20/03/2017</td><td style="text-align:right; ">7</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="text-align:right; ">10/02/2010</td><td style="text-align:right; ">7.4</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td style="text-align:right; ">10/02/2010</td><td style="text-align:right; ">7.4</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >M2</td><td >=LOOKUP(2,1/(B2:K2<>""),A2:J2)</td></tr><tr><td >N2</td><td >=LOOKUP(2,1/(A2:J2<>""),A2:J2)</td></tr></table></td></tr></table> <br /><br />
 
Upvote 0
Use this

Sheet

ABCDEFGHIJKLMN

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:75px;"><col style="width:51px;"><col style="width:75px;"><col style="width:51px;"><col style="width:75px;"><col style="width:51px;"><col style="width:39px;"><col style="width:51px;"><col style="width:39px;"><col style="width:51px;"><col style="width:35px;"><col style="width:31px;"><col style="width:123px;"><col style="width:124px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]DATE[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]RESULT[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]DATE[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]RESULT[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]DATE[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]RESULT[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]DATE[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]RESULT[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]DATE[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]RESULT[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]LATEST DATE[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=92d050]#92d050[/URL] , align: center"]LATEST RESULT[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]
[TD="align: right"]20/10/2015[/TD]
[TD="align: right"]10.5[/TD]
[TD="align: right"]19/10/2016[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]20/10/2018[/TD]
[TD="align: right"]8.2[/TD]

[TD="align: right"]20/10/2018[/TD]
[TD="align: right"]8.2[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: right"]30/01/2016[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: right"]20/03/2017[/TD]
[TD="align: right"]7[/TD]

[TD="align: right"]20/03/2017[/TD]
[TD="align: right"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]
[TD="align: right"]10/02/2010[/TD]
[TD="align: right"]7.4[/TD]

[TD="align: right"]10/02/2010[/TD]
[TD="align: right"]7.4[/TD]

</tbody>

CellFormula
M2=LOOKUP(2,1/(B2:K2<>""),A2:J2)
N2=LOOKUP(2,1/(A2:J2<>""),A2:J2)

<tbody>
</tbody>

<tbody>
</tbody>

Hi Dante!

Thank you for your reply.

Would it be possible for your to explain that for me please? I tried but it wasn't working exactly (it didn't return any value - didn't say any error either). Why is the lookup value '2' ?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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