Hi all,
I need help with a formula, and I'd be super happy if somebody could help me. I have explained the issue in the table below. Maybe it's possible to have a macro or similar that can "go through" the file and automatically correct the dates? What's the best solution you think? The output should be the same as below - but with the correct dates. Thanks on beforehand!
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 100px"><col width="100"><col width="100"><col width="100"><col width="100"></colgroup><tbody>[TR]
[TD="bgcolor: #ffd966"]Line[/TD]
[TD="bgcolor: #ffd966"]FIRSTNAME[/TD]
[TD="bgcolor: #ffd966"]LASTNAME[/TD]
[TD="bgcolor: #ffd966"]ORDERID[/TD]
[TD="bgcolor: #ffd966"]DATE[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Albert[/TD]
[TD]Albertson[/TD]
[TD="align: right"]1000[/TD]
[TD]2017-11-01[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Albert[/TD]
[TD]Albertson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-01[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Albert[/TD]
[TD]Albertson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-01[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]Bob[/TD]
[TD]Bobson[/TD]
[TD="align: right"]1000[/TD]
[TD]2017-11-04[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]Bob[/TD]
[TD]Bobson[/TD]
[TD="align: right"]1000[/TD]
[TD]2017-11-06[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]Bob[/TD]
[TD]Bobson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-04[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]Cat[/TD]
[TD]Catson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-07[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Issue: If FIRSTNAME+LASTNAME has made an order with the same ORDER ID on the same DATE (like line 2 and 3), then postpone DATE by +1 for one of the lines, for example for line nbr 3.
Also, if possible: Postpone DATE by +1 for Line nbr 3 UNLESS the FIRSTNAME+LASTNAME have placed an order on the +1 day with the same ORDER ID - if so then plus +2 days,[/TD]
[/TR]
</tbody>[/TABLE]
I need help with a formula, and I'd be super happy if somebody could help me. I have explained the issue in the table below. Maybe it's possible to have a macro or similar that can "go through" the file and automatically correct the dates? What's the best solution you think? The output should be the same as below - but with the correct dates. Thanks on beforehand!
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 100px"><col width="100"><col width="100"><col width="100"><col width="100"></colgroup><tbody>[TR]
[TD="bgcolor: #ffd966"]Line[/TD]
[TD="bgcolor: #ffd966"]FIRSTNAME[/TD]
[TD="bgcolor: #ffd966"]LASTNAME[/TD]
[TD="bgcolor: #ffd966"]ORDERID[/TD]
[TD="bgcolor: #ffd966"]DATE[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Albert[/TD]
[TD]Albertson[/TD]
[TD="align: right"]1000[/TD]
[TD]2017-11-01[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Albert[/TD]
[TD]Albertson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-01[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Albert[/TD]
[TD]Albertson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-01[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]Bob[/TD]
[TD]Bobson[/TD]
[TD="align: right"]1000[/TD]
[TD]2017-11-04[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]Bob[/TD]
[TD]Bobson[/TD]
[TD="align: right"]1000[/TD]
[TD]2017-11-06[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]Bob[/TD]
[TD]Bobson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-04[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]Cat[/TD]
[TD]Catson[/TD]
[TD="align: right"]1500[/TD]
[TD]2017-11-07[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Issue: If FIRSTNAME+LASTNAME has made an order with the same ORDER ID on the same DATE (like line 2 and 3), then postpone DATE by +1 for one of the lines, for example for line nbr 3.
Also, if possible: Postpone DATE by +1 for Line nbr 3 UNLESS the FIRSTNAME+LASTNAME have placed an order on the +1 day with the same ORDER ID - if so then plus +2 days,[/TD]
[/TR]
</tbody>[/TABLE]