Hi, everyone. I'm stuck on something and would appreciate any teaching.
I have a sheet that has four named tables: Month28, Month29, Month30, and Month31. The numbers refer to the numbers of days in a month. So if the current month has 31 days, I need to refer to the Month31 table.
I'm using VLOOKUPS like =VLOOKUP(DAY($B$2),Month31,2,FALSE), where B2 has today's date using =TODAY().
What I can't figure out is how to replace the hardcoded Month31 with something that is based on formulas.
I know how to calculate the number of days in a month using =DAY(EOMONTH(B2,0)) and how to create Month31 by ="Month"&I2, where I2 has the eomonth formula.
But what I don't know is how to write that into the VLOOKUP formula itself to make it more elegant and automated. I'd appreciate any advice. Thanks!
I have a sheet that has four named tables: Month28, Month29, Month30, and Month31. The numbers refer to the numbers of days in a month. So if the current month has 31 days, I need to refer to the Month31 table.
I'm using VLOOKUPS like =VLOOKUP(DAY($B$2),Month31,2,FALSE), where B2 has today's date using =TODAY().
What I can't figure out is how to replace the hardcoded Month31 with something that is based on formulas.
I know how to calculate the number of days in a month using =DAY(EOMONTH(B2,0)) and how to create Month31 by ="Month"&I2, where I2 has the eomonth formula.
But what I don't know is how to write that into the VLOOKUP formula itself to make it more elegant and automated. I'd appreciate any advice. Thanks!