End of Month & Beginning of Month return blank

DDH

Well-known Member
Joined
Sep 25, 2003
Messages
513
I am trying to have a cell return a blank if no date is in the selected cell
for both Beginning of Month and End of the Month.

I DO NOT have the End of the Month correct. This just returns 1/31/1900
IF(ISERROR(EOMONTH(AE40,0),"",EOMONTH(AE40,0))


I think I have beginning of the month correct To return a blank if no value is in AE41
IF(AE41-DAY(AE41)=0,"",AE41-DAY(AE41)+1)

Thank you for your help.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
When EOMONTH evaluates an empty cell it returns the date 1/31/1900, not a error, so just check for the cell being empty, i.e.

=IF(AE40="","",EOMONTH(AE40,0))

You can get beginning of month with EOMONTH of the previous month +1, so

=IF(AE40="","",EOMONTH(AE40,-1)+1)
 
Upvote 0
barry houdini - Thank you for your reply.
They work perfect.
I never thought of using the IF function, I was trying all other ways that were not working.

Thank you so very much for all of your help.
 
Upvote 0

Forum statistics

Threads
1,215,398
Messages
6,124,699
Members
449,180
Latest member
craigus51286

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top