Hi all. I have the following problem:
I have a table and for each record there are multiple date fields. Here is a brief example (these dates use the British format of Day/Month/Year):
[TABLE="width: 658"]
<tbody>[TR]
[TD]Date1[/TD]
[TD]Date2[/TD]
[TD]Date3[/TD]
[TD]Date4[/TD]
[TD]Date5[/TD]
[TD]Date6[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]06/09/2017[/TD]
[/TR]
[TR]
[TD="align: right"]03/11/2017[/TD]
[TD="align: right"]06/10/2017[/TD]
[TD="align: right"]28/09/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]13/11/2017[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]26/04/2018[/TD]
[TD="align: right"]03/04/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[TD][/TD]
[TD="align: right"]02/05/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20/04/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]05/02/2018[/TD]
[TD="align: right"]05/02/2018[/TD]
[TD][/TD]
[TD="align: right"]06/03/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]14/12/2017[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]08/09/2017[/TD]
[TD][/TD]
[TD="align: right"]19/02/2018[/TD]
[/TR]
[TR]
[TD="align: right"]03/05/2018[/TD]
[TD][/TD]
[TD="align: right"]26/04/2018[/TD]
[TD="align: right"]06/04/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[/TR]
[TR]
[TD="align: right"]23/04/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]02/04/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]08/09/2017[/TD]
[TD][/TD]
[TD="align: right"]02/04/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]26/04/2018[/TD]
[TD="align: right"]03/04/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[TD][/TD]
[TD="align: right"]02/05/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]01/04/2018[/TD]
[TD][/TD]
[TD="align: right"]18/10/2016[/TD]
[/TR]
</tbody>[/TABLE]
I would like a sheet formula which will enable me to find the size of the largest gap in "consecutive" dates in each record.
As you can see, the data are entered haphazardly. e.g. it cannot be assumed that Date2 is after Date1. It may in fact precede it. If Date1 is not filled, it does not mean that a subsequent date field is not also filled. The formula has to remove blanks from consideration.
Taking the example of the second row in the above data, the largest gap is between Date1 and Date2 (28 days), and this is the required answer. Between Date2 and Date 3 in the same row it is 8 days. The gap between Date1 and Date3 is larger at 36 days, but does not count because Date2 is intermediate between them. You can assume that the header Date1 is in cell A1.
Thanks for any help on this.
I have a table and for each record there are multiple date fields. Here is a brief example (these dates use the British format of Day/Month/Year):
[TABLE="width: 658"]
<tbody>[TR]
[TD]Date1[/TD]
[TD]Date2[/TD]
[TD]Date3[/TD]
[TD]Date4[/TD]
[TD]Date5[/TD]
[TD]Date6[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]06/09/2017[/TD]
[/TR]
[TR]
[TD="align: right"]03/11/2017[/TD]
[TD="align: right"]06/10/2017[/TD]
[TD="align: right"]28/09/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]13/11/2017[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]26/04/2018[/TD]
[TD="align: right"]03/04/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[TD][/TD]
[TD="align: right"]02/05/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20/04/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]05/02/2018[/TD]
[TD="align: right"]05/02/2018[/TD]
[TD][/TD]
[TD="align: right"]06/03/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]14/12/2017[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]08/09/2017[/TD]
[TD][/TD]
[TD="align: right"]19/02/2018[/TD]
[/TR]
[TR]
[TD="align: right"]03/05/2018[/TD]
[TD][/TD]
[TD="align: right"]26/04/2018[/TD]
[TD="align: right"]06/04/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[/TR]
[TR]
[TD="align: right"]23/04/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]02/04/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]08/09/2017[/TD]
[TD][/TD]
[TD="align: right"]02/04/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]26/04/2018[/TD]
[TD="align: right"]03/04/2018[/TD]
[TD="align: right"]02/05/2018[/TD]
[TD][/TD]
[TD="align: right"]02/05/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]01/04/2018[/TD]
[TD][/TD]
[TD="align: right"]18/10/2016[/TD]
[/TR]
</tbody>[/TABLE]
I would like a sheet formula which will enable me to find the size of the largest gap in "consecutive" dates in each record.
As you can see, the data are entered haphazardly. e.g. it cannot be assumed that Date2 is after Date1. It may in fact precede it. If Date1 is not filled, it does not mean that a subsequent date field is not also filled. The formula has to remove blanks from consideration.
Taking the example of the second row in the above data, the largest gap is between Date1 and Date2 (28 days), and this is the required answer. Between Date2 and Date 3 in the same row it is 8 days. The gap between Date1 and Date3 is larger at 36 days, but does not count because Date2 is intermediate between them. You can assume that the header Date1 is in cell A1.
Thanks for any help on this.