Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
find date
I have a 'holiday' sheet with input holiday as follows:
23 Dec 2006 24 Dec 2006 25 Dec 2006 26 Dec 2006 My example is If I type in 22 Dec. 2006 in cell A1. As 22 Dec 2006 is not fall on holiday, the cell A1 shows 22 Dec. 2006 (remain unchange). If I type in 23 Dec. 2006, the A2 cell will show 27 Dec 2006. Is there any macro that could assist me to do this. Thank you for your help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
find date
Since the number of holidays is fairly small and probably only gets updated
annually, I'd create a table where the first column is the holiday and the second column is the next workday. Then coverting from a given date (say in A1) to the next workday is a pretty simple formula. If the table on the worksheet Holidays, in columns A:B, the formula is =if(isna(match(a1,Holidays!A:A,false)),a1,vlookup( a1,Holidays!A:B,2,false)) That is, if the date in question is not a holiday, no change; otherwise, return the corresponding date from column B. HTH. --Bruce "Anna" wrote: I have a 'holiday' sheet with input holiday as follows: 23 Dec 2006 24 Dec 2006 25 Dec 2006 26 Dec 2006 My example is If I type in 22 Dec. 2006 in cell A1. As 22 Dec 2006 is not fall on holiday, the cell A1 shows 22 Dec. 2006 (remain unchange). If I type in 23 Dec. 2006, the A2 cell will show 27 Dec 2006. Is there any macro that could assist me to do this. Thank you for your help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find Specific date in Biwwekly Based on date | Excel Discussion (Misc queries) | |||
Julian date - find next highest date/number | Excel Worksheet Functions | |||
Find the date of the coming up Saturday given the current date. | Excel Worksheet Functions | |||
Using variables to make a date and using find method to find that. | Excel Programming | |||
Find date and copy range based on that date | Excel Programming |