If date in column A is less than 15th of month can I display next.

G

Guest

If date in column A is less than 15th of month is there a formula I can use
to display the next mth in column B such that I can obtain the following

Column A Column B
05-Oct-07 Oct-07
05-Nov-07 Nov-07
15-Oct-07 Nov-07
19-Nov-07 Dec-07

Thanks
 
G

Guest

One way

In B1:
=IF(A1="","",IF(DAY(A1)>=15,DATE(YEAR(A1),MONTH(A1)+1,1),DATE(YEAR(A1),MONTH(A1),1)))
Format B1 as custom, type: mmm-yy. Copy down.
 
G

Guest

Bloody marvelous

Thank you
--
Angela


Max said:
One way

In B1:
=IF(A1="","",IF(DAY(A1)>=15,DATE(YEAR(A1),MONTH(A1)+1,1),DATE(YEAR(A1),MONTH(A1),1)))
Format B1 as custom, type: mmm-yy. Copy down.
 
D

Dave Peterson

Another version based on Max's idea:

=IF(A1="","",DATE(YEAR(A1),MONTH(A1)+(DAY(A1)>=15),1))

(day(a1)>=15) will return True or false.
When added to a number (like month(a)), it's like adding 1 (true) or 0 (false).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top