Forum Discussion

busymamabee's avatar
busymamabee
Copper Contributor
Sep 29, 2022

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!

 

 

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor
    What 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?
    • busymamabee's avatar
      busymamabee
      Copper Contributor
      I 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?

Resources