Forum Discussion
CADDmanDH
Oct 22, 2022Copper Contributor
Formula to check what month in another Cell, comes back as "1" on a Blank Cell
So I'll describe this as I can't share the file. In a Table, Cell B4 is for a Invoice entry #, When an invoice is entered it pulls the information from that Table. A Cell (J4) that pulls a D...
Riny_van_Eekelen
Oct 22, 2022Platinum Contributor
CADDmanDH If J5 is empty, the formula =MONTH(J5) will always return 1. An empty cell is seen as 0 (zero) when you use a function that expects a number/date. Enter the number 0 somewhere and format the cell as a date. You'll see that Excel returns January 0, 1900. Apply the MONTH function to that cell and you get 1 for the month of January.
To avoid this you need to use a similar check for an empty cell as you have in the other formula. So, something like =IF(J5="","",MONTH(J5))