Adding one day to date based on other value

Benjaminmin

Board Regular
Joined
Nov 20, 2009
Messages
116
Hi,

I have a formula with a lot of prices each on a corresponding date.
However the date list excludes weekend and holidays.

I am now going to make a list of those dates, with the first (in cell F4) being =MAX(A4,Shell!A4,Tesco!A4,BHP!A4,Glaxo!A4), which works fine.

Is there a way that I can now get cell F5 (the one below) pick up the date in F4 and then take the next date in the list (list is A4:A7956).

The problem is that it is not a given that the date after 22/04/1997 is 23/04/1997 since that might be a holiday.

If anyone can help with this problem it would be amazing

Thanks in advance!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Is the list A4:A7956 Sorted in Ascending order?

Try

=INDEX(A$4:A$7956,MATCH(F4,A$4:A$7956,0)+1)
 
Upvote 0
Rather than re-create the wheel, you may also want to take a look at the WORKDAY function, which calculates a WORKDAY some number of days away factoring in weekends and holidays (you just need to create a list of your Holidays).
 
Upvote 0
Is the list A4:A7956 Sorted in Ascending order?

Try

=INDEX(A$4:A$7956,MATCH(F4,A$4:A$7956,0)+1)

Absolutely brilliant. Thank you very much for the fast and perfect answer

EDIT: @Joey4, thank you for you suggestion as well. The problem with this is that the dates and prices are imported via Bloomberg, so I couldnt apply any holiday filters, plus the dates are "overwritten" every time I import. But thank you anyway!
 
Last edited:
Upvote 0
Excel Workbook
EFGHIJKLMN
21ShjellBPEddoGlaxo
2201/01/20113.5601/01/20112.601/01/20113.0901/01/20112.701/01/20113.56
2302/01/20112.6102/01/20113.5702/01/20112.5102/01/20113.7502/01/20113.75
2406/01/20113.6405/01/20112.4504/01/20113.2306/01/20112.6203/01/2011
2509/01/20113.409/01/20113.1107/01/20112.3107/01/20112.3104/01/2011
2614/01/20113.3211/01/20113.4611/01/20113.811/01/20112.8705/01/2011
2715/01/20113.0512/01/20112.9212/01/20112.5212/01/20113.8406/01/20112.62
2817/01/20113.0515/01/20113.5215/01/20112.9513/01/20112.3707/01/2011
2922/01/20112.3717/01/20113.5519/01/20112.9514/01/20112.0208/01/2011
3023/01/20112.6322/01/20113.9724/01/20112.4918/01/20113.6809/01/20113.11
3124/01/20112.6327/01/20113.227/01/20112.5122/01/20112.1410/01/2011
3225/01/20113.501/02/20113.0730/01/20113.2824/01/20112.4111/01/2011
3327/01/20113.805/02/20113.7904/02/20112.8329/01/20112.1412/01/2011
3431/01/20112.5606/02/20112.6408/02/20112.531/01/20112.4213/01/2011
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

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