Date formula that does not go into the other month

Fin Fang Foom

Well-known Member
Joined
Mar 20, 2005
Messages
598
Hi everyone,

Does anyone has an idea how to do this ?

I input this date in cell C2 10-01-2005 and in D2 I put this formula in =TEXT(C2+1,"mm-dd-yyy") then I copy the formula across the columns to AG. Now If I do this for the month of November it will only have 30 days in that month. So in cell C2 If I change it to 11-01-2005 in cell AG2 it will show 12-01-2005 I dont want to show next month is there a way to have it blank ? So I if input in cell C2 02-01-2005 then the formula calculates accross the columns and stops at 02-29-2005.

Does somebody have a formula for that ?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You could use an IF() statement that checks the value of the month. If it is different than your first cell in the series, then leave the cell blank.


May I ask why you are using a date and then converting it to text?
 
Upvote 0
Thanks Von Pookie it works perfect.

nbrcrunch,

The reason I'm converting Date to a text format is I'm doing a VLOOKUP formula. The files are saved as a Date text format. The reason the users save it that way because its easier to look for on the network.
 
Upvote 0

Forum statistics

Threads
1,196,328
Messages
6,014,674
Members
441,835
Latest member
rthomas268

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