Automatically generate dates depending on cell

AlexiT4444

New Member
Joined
Jan 28, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am in the process of extracting data, but I cannot find anything online which can help me. What I am trying to do is insert the date of the first date they dispatched and the last date they were dispatched and automatically input this data in columns B and C.

Any help would be much appreciated.

Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1IDFirst DispatchLast Dispatch27/10/201928/10/201929/10/201930/10/201931/10/201901/11/201902/11/201903/11/201904/11/201905/11/201906/11/201907/11/201908/11/201909/11/201910/11/201911/11/201912/11/201913/11/201914/11/201915/11/201916/11/201917/11/201918/11/201919/11/201920/11/201921/11/201922/11/201923/11/201924/11/2019
210635248047730666887109766101077680918500101978584771110
32000007775000005100
430735045060560605169766440080716582680066851070691040
5400490000
6502957600657705556100798753070665211154007311276566000
76053505102764048708810672008300986100929869606600
870627557056590714184100000000000
98078474304684071819312587530897676106549105241915810400
109000400108790876977759363026117698745009527576046910
11100885555087660717378968156083846608600820957594960
1211055574204581080859211784600857067105880099124869511200
1312065404104561066598798870010000115790098110979010200
1413046595067697108365589805207686785482980
1514048425045757307875671096600701099094871120
16150335460426166081795580690010584889873900
1716051484750746606483811035500
181700053434864
191800000575405644607691810911319887971240
2019043325156516204771769208109076785670960
212003840474283620697080078830
222104550514279670668167068990
23220000006205558609656900
24230454453537568064968269841040
2524003746323758073827692851210
26250047394746780828391085910
272602130463300
28270564553526989083878789851230
29280534453478780090637683841150
3029048435448807501127510974841110
3130003935462784085545865821090
323105350595563490008788901030
3332068485747100930938987094930
3433046474860976506875968082970
353405250574296840949387103911380
36350000545439049100826681930
3736045594555739000000000
38370535147568182089729666651040
39380523658558471081887001021070
40390000056600
414000004758490
424100085000
434200064001260
44430006500800
454400010100890
464500057001350
474600019000
484700049000
494800005252700
50490000001140
51500000057560
525100045001060
535200073000
545300003500
555400047001120
Sheet1
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
=MINIFS($D$1:$AF$1,D2:AF2,"<>"&0,D2:AF2,"<>"&"")
=MAXIFS($D$1:$AF$1,D2:AF2,"<>"&0,D2:AF2,"<>"&"")

Book2
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1IDFirst DispatchLast Dispatch10/27/1910/28/1910/29/1910/30/1910/31/1911/1/1911/2/1911/3/1911/4/1911/5/1911/6/1911/7/1911/8/1911/9/1911/10/1911/11/1911/12/1911/13/1911/14/1911/15/1911/16/1911/17/1911/18/1911/19/1911/20/1911/21/1911/22/1911/23/1911/24/19
2110/28/1911/23/190635248047730666887109766101077680918500101978584771110
3211/1/1911/8/19000007775000005100
4310/28/1911/23/190735045060560605169766440080716582680066851070691040
5410/29/1910/29/1900490000
6510/28/1911/22/1902957600657705556100798753070665211154007311276566000
7610/28/1911/22/19053505102764048708810672008300986100929869606600
8710/28/1911/7/190627557056590714184100000000000
9810/28/1911/22/19078474304684071819312587530897676106549105241915810400
10910/30/1911/23/19000400108790876977759363026117698745009527576046910
111010/28/1911/23/190885555087660717378968156083846608600820957594960
121110/28/1911/22/19055574204581080859211784600857067105880099124869511200
131210/28/1911/22/19065404104561066598798870010000115790098110979010200
141311/4/1911/23/19046595067697108365589805207686785482980
151411/4/1911/23/19048425045757307875671096600701099094871120
161511/4/1911/23/190335460426166081795580690010584889873900
171611/4/1911/15/19051484750746606483811035500
181711/6/1911/9/1900053434864
191811/8/1911/23/1900000575405644607691810911319887971240
201911/4/1911/23/19043325156516204771769208109076785670960
212011/11/1911/23/1903840474283620697080078830
222111/11/1911/23/1904550514279670668167068990
232211/16/1911/23/190000006205558609656900
242311/11/1911/23/190454453537568064968269841040
252411/12/1911/23/19003746323758073827692851210
262511/12/1911/23/190047394746780828391085910
272611/11/1911/14/1902130463300
282711/11/1911/23/190564553526989083878789851230
292811/11/1911/23/190534453478780090637683841150
302911/11/1911/23/19048435448807501127510974841110
313011/12/1911/23/19003935462784085545865821090
323111/11/1911/23/1905350595563490008788901030
333211/11/1911/23/19068485747100930938987094930
343311/11/1911/23/19046474860976506875968082970
353411/11/1911/23/1905250574296840949387103911380
363511/14/1911/23/190000545439049100826681930
373611/11/1911/16/19045594555739000000000
383711/11/1911/23/190535147568182089729666651040
393811/11/1911/23/190523658558471081887001021070
403911/22/1911/23/190000056600
414011/21/1911/23/1900004758490
424111/20/1911/20/1900085000
434211/20/1911/23/1900064001260
444311/20/1911/23/190006500800
454411/20/1911/23/1900010100890
464511/20/1911/23/1900057001350
474611/20/1911/20/1900019000
484711/20/1911/20/1900049000
494811/21/1911/23/1900005252700
504911/23/1911/23/190000001140
515011/22/1911/23/190000057560
525111/20/1911/23/1900045001060
535211/20/1911/20/1900073000
545311/21/1911/21/1900003500
555411/20/1911/23/1900047001120
Sheet1
Cell Formulas
RangeFormula
B2:B55B2=MINIFS($D$1:$AF$1,D2:AF2,"<>"&0,D2:AF2,"<>"&"")
C2:C55C2=MAXIFS($D$1:$AF$1,D2:AF2,"<>"&0,D2:AF2,"<>"&"")
 
Last edited:
Upvote 0
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1IDFirst DispatchLast Dispatch27/10/201928/10/201929/10/201930/10/201931/10/201901/11/201902/11/201903/11/201904/11/201905/11/201906/11/201907/11/201908/11/201909/11/201910/11/201911/11/201912/11/201913/11/201914/11/201915/11/201916/11/201917/11/201918/11/201919/11/201920/11/201921/11/201922/11/201923/11/201924/11/2019
2128/10/201923/11/20190635248047730666887109766101077680918500101978584771110
3201/11/201908/11/2019000007775000005100
4328/10/201923/11/20190735045060560605169766440080716582680066851070691040
5429/10/201929/10/201900490000
6528/10/201922/11/201902957600657705556100798753070665211154007311276566000
7628/10/201922/11/2019053505102764048708810672008300986100929869606600
8728/10/201907/11/20190627557056590714184100000000000
9828/10/201922/11/2019078474304684071819312587530897676106549105241915810400
10930/10/201923/11/2019000400108790876977759363026117698745009527576046910
111028/10/201923/11/20190885555087660717378968156083846608600820957594960
121128/10/201922/11/2019055574204581080859211784600857067105880099124869511200
131228/10/201922/11/2019065404104561066598798870010000115790098110979010200
141304/11/201923/11/2019046595067697108365589805207686785482980
151404/11/201923/11/2019048425045757307875671096600701099094871120
161504/11/201923/11/20190335460426166081795580690010584889873900
171604/11/201915/11/2019051484750746606483811035500
181706/11/201909/11/201900053434864
191808/11/201923/11/201900000575405644607691810911319887971240
201904/11/201923/11/2019043325156516204771769208109076785670960
212011/11/201923/11/201903840474283620697080078830
222111/11/201923/11/201904550514279670668167068990
232216/11/201923/11/20190000006205558609656900
242311/11/201923/11/20190454453537568064968269841040
252412/11/201923/11/2019003746323758073827692851210
262512/11/201923/11/20190047394746780828391085910
272611/11/201914/11/201902130463300
282711/11/201923/11/20190564553526989083878789851230
292811/11/201923/11/20190534453478780090637683841150
302911/11/201923/11/2019048435448807501127510974841110
313012/11/201923/11/2019003935462784085545865821090
323111/11/201923/11/201905350595563490008788901030
333211/11/201923/11/2019068485747100930938987094930
343311/11/201923/11/2019046474860976506875968082970
353411/11/201923/11/201905250574296840949387103911380
363514/11/201923/11/20190000545439049100826681930
373611/11/201916/11/2019045594555739000000000
383711/11/201923/11/20190535147568182089729666651040
393811/11/201923/11/20190523658558471081887001021070
403922/11/201923/11/20190000056600
414021/11/201923/11/201900004758490
424120/11/201920/11/201900085000
434220/11/201923/11/201900064001260
444320/11/201923/11/20190006500800
454420/11/201923/11/201900010100890
464520/11/201923/11/201900057001350
474620/11/201920/11/201900019000
484720/11/201920/11/201900049000
494821/11/201923/11/201900005252700
504923/11/201923/11/20190000001140
515022/11/201923/11/20190000057560
525120/11/201923/11/201900045001060
535220/11/201920/11/201900073000
545321/11/201921/11/201900003500
555420/11/201923/11/201900047001120
Data
Cell Formulas
RangeFormula
B2:B55B2=INDEX($D$1:$AF$1,AGGREGATE(15,6,(COLUMN($D$1:$AF$1)-COLUMN($D$1)+1)/($D2:$AF2>0),1))
C2:C55C2=INDEX($D$1:$AF$1,AGGREGATE(14,6,(COLUMN($D$1:$AF$1)-COLUMN($D$1)+1)/($D2:$AF2>0),1))
 
Upvote 0
Solution
What about
Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1IDFirst DispatchLast Dispatch27/10/201928/10/201929/10/201930/10/201931/10/201901/11/201902/11/201903/11/201904/11/201905/11/201906/11/201907/11/201908/11/201909/11/201910/11/201911/11/201912/11/201913/11/201914/11/201915/11/201916/11/201917/11/201918/11/201919/11/201920/11/201921/11/201922/11/201923/11/201924/11/2019
2127/10/201924/11/20190635248047730666887109766101077680918500101978584771110
3227/10/201924/11/2019000007775000005100
4327/10/201924/11/20190735045060560605169766440080716582680066851070691040
5427/10/201902/11/201900490000
6527/10/201924/11/201902957600657705556100798753070665211154007311276566000
7627/10/201924/11/2019053505102764048708810672008300986100929869606600
8727/10/201916/11/20190627557056590714184100000000000
9827/10/201924/11/2019078474304684071819312587530897676106549105241915810400
10927/10/201924/11/2019000400108790876977759363026117698745009527576046910
111027/10/201924/11/20190885555087660717378968156083846608600820957594960
121127/10/201924/11/2019055574204581080859211784600857067105880099124869511200
131227/10/201924/11/2019065404104561066598798870010000115790098110979010200
141303/11/201924/11/2019046595067697108365589805207686785482980
151403/11/201924/11/2019048425045757307875671096600701099094871120
161503/11/201924/11/20190335460426166081795580690010584889873900
171603/11/201924/11/2019051484750746606483811035500
181703/11/201909/11/201900053434864
191803/11/201924/11/201900000575405644607691810911319887971240
201903/11/201924/11/2019043325156516204771769208109076785670960
212010/11/201924/11/201903840474283620697080078830
222110/11/201924/11/201904550514279670668167068990
232210/11/201924/11/20190000006205558609656900
242310/11/201924/11/20190454453537568064968269841040
252410/11/201924/11/2019003746323758073827692851210
262510/11/201924/11/20190047394746780828391085910
272610/11/201916/11/201902130463300
282710/11/201924/11/20190564553526989083878789851230
292810/11/201924/11/20190534453478780090637683841150
302910/11/201924/11/2019048435448807501127510974841110
313010/11/201924/11/2019003935462784085545865821090
323110/11/201924/11/201905350595563490008788901030
333210/11/201924/11/2019068485747100930938987094930
343310/11/201924/11/2019046474860976506875968082970
353410/11/201924/11/201905250574296840949387103911380
363510/11/201924/11/20190000545439049100826681930
373610/11/201924/11/2019045594555739000000000
383710/11/201924/11/20190535147568182089729666651040
393810/11/201924/11/20190523658558471081887001021070
403917/11/201924/11/20190000056600
414017/11/201924/11/201900004758490
424117/11/201923/11/201900085000
434217/11/201924/11/201900064001260
444317/11/201924/11/20190006500800
454417/11/201924/11/201900010100890
464517/11/201924/11/201900057001350
474617/11/201923/11/201900019000
484717/11/201923/11/201900049000
494817/11/201924/11/201900005252700
504917/11/201924/11/20190000001140
515017/11/201924/11/20190000057560
525117/11/201924/11/201900045001060
535217/11/201923/11/201900073000
545317/11/201923/11/201900003500
555417/11/201924/11/201900047001120
Sheet3
Cell Formulas
RangeFormula
B2:B55B2=INDEX($D$1:$AF$1,1,AGGREGATE(15,6,(COLUMN($D2:$AF2)-COLUMN($D2)+1)/(--($D2:$AF2<>"")),1))
C2:C55C2=INDEX($D$1:$AF$1,1,AGGREGATE(14,6,(COLUMN($D2:$AF2)-COLUMN($D2)+1)/(--($D2:$AF2<>"")),1))
 
Upvote 0
Or try:

B2=AGGREGATE(15,6,$D$1:$AF$1/(D2:AF2<>0),1)

C2=AGGREGATE(14,6,$D$1:$AF$1/(D2:AF2<>0),1)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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