# Thread: Dates

1. Loungers,

I have a spreadsheet that includes a list of days for each month (see attached).

What I would like to do is only show the days for the month selected. As in the example, April also includes the 1 May 09 as there are 31 cells selected, February also includes March dates.

I hope that makes sense

2. In D4:
=DATE(YEAR(C2),MONTH(C2),1)

The other 30 cells in the column can remain the same.

3. See attached for a way to do with formulas. It can also be accomplished with Conditional Formatting or VBA, but formulas were quicker for me...

[quote name='verada' post='770553' date='14-Apr-2009 19:18']Loungers,

I have a spreadsheet that includes a list of days for each month (see attached).

What I would like to do is only show the days for the month selected. As in the example, April also includes the 1 May 09 as there are 31 cells selected, February also includes March dates.

I hope that makes sense[/quote]

4. Sorry - misread the question. You can use the following in the other 30.

=IF(MONTH(D4+1)=MONTH(\$C\$2),D4+1,"")

5. Thanks for the quick replies - will give your suggestions a go

Cheers

6. I actually tried to get the bug off my screen.

After entering the formulas, pull up the month of February and make sure it works the way you intended.

[quote name='verada' post='770561' date='14-Apr-2009 20:22']Thanks for the quick replies - will give your suggestions a go

Cheers[/quote]

7. Ricky - I tried February to test and noticed error in last couple of cells, amended formula to =IF(D32="","",IF(MONTH(D32+1)=MONTH(\$C\$2),D32+1,"" )) - problem fixed!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•