Need help with formula

Potatomr

New Member
Joined
Nov 10, 2017
Messages
6
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]
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

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