mardi 17 avril 2018

Auto populating the 31st day of a given month in excel

I am building a template for a data entry spreadsheet at work for some of the old-timers. The template that they will see will be columns of categories and the rows will be dates including the day of the week. I know how to auto-fill the date an day by drag and drop, but honestly some of these guys even screw that up. So, I am building this spreadsheet that auto populates the date and the day for the whole month based on entering the first day of the month that way its as simple as possible, but I am having trouble with the 31st day of some months. I don't want to have two different spreadsheets. Right now the code that I have is:

=EOMONTH(A5,0)

This works if it is the 31st day of the month, which is great, but if it is not a month that has 31 days it repeats the 30th day. I'd really like it to be an if statement, but I know my code is off because it always generates a FALSE.

Is =if(A5(M<2),"EOMONTH(A5,0)") heading in the right direction? It generates a #REF! reponse with that code.

Thank you for any input!

Aucun commentaire:

Enregistrer un commentaire