Forum Discussion
busymamabee
Sep 29, 2022Copper Contributor
Dynamic Calendar Date Returning #REF! Issue
Hello,
I'm attempting to create a dynamic calendar and am running into an issue with the dates populating correctly. The good news is I've moved from a #VALUE error to a #REF! error but still...can anyone tell me where I'm going wrong here?
For reference, ScYear = E1, SelMonth = B15 (Month in number format), and E29 returns the value for the weekday start.
The formula I'm currently using is:
=IF(WEEKDAY(DATE(ScYear,SelMonth,1),1)=E29(ScYear,SelMonth,1),"")
Any help is appreciated!
- chahineIron Contributor
- Harun24HRBronze ContributorWhat is E29(ScYear,SelMonth,1) in your formula. You can use cell reference in this way. Do you mean Date(ScYear,SelMonth,1) or =IF(WEEKDAY(DATE(ScYear,SelMonth,1),1)=E29,Date(ScYear,SelMonth,1),""). What result do you expect in E8 cell?
- busymamabeeCopper ContributorI think the latter. The goal is that the Weekday Start on E3 can be switched and the calendar itself will populate the dates automatically, either leaving the square blank if the month doesn't start until later in the week, or fill in the date (1, 2, 3, etc.) otherwise. Does that make sense?