Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Another date formula
Here's my data:
A B 1 1-Jun-08 1-Jul-08 2 30-Jun-08 31-Jul-08 I need a formula in B1 and B2 that will: If col A date is first day of month then return first day of next month; or If col A date is last day of month then return last day of next month. Thanks! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Another date formula
Hi nibbana,
For A1/B1: =DATE(Year(A1),MONTH(A1)+1,1) For A2/B2: =DATE(Year(A2),MONTH(A1)+2,0) -- Cheers macropod [MVP - Microsoft Word] "nibbana" wrote in message ... Here's my data: A B 1 1-Jun-08 1-Jul-08 2 30-Jun-08 31-Jul-08 I need a formula in B1 and B2 that will: If col A date is first day of month then return first day of next month; or If col A date is last day of month then return last day of next month. Thanks! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Another date formula
In B1 and copied down:
=IF(MONTH((DATE(YEAR(A1),MONTH(A1),DAY(A1))+1))MO NTH(A1), DATE(YEAR(A1),MONTH(A1)+2,1)-1, DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))) -- "Actually, I *am* a rocket scientist." -- JB Your feedback is appreciated, click YES if this post helped you. "nibbana" wrote: Here's my data: A B 1 1-Jun-08 1-Jul-08 2 30-Jun-08 31-Jul-08 I need a formula in B1 and B2 that will: If col A date is first day of month then return first day of next month; or If col A date is last day of month then return last day of next month. Thanks! |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Another date formula
We don't have to work so hard on the IF test:
=IF(MONTH(A1+1)MONTH(A1), DATE(YEAR(A1),MONTH(A1)+2,1)-1, DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))) -- "Actually, I *am* a rocket scientist." -- JB Your feedback is appreciated, click YES if this post helped you. "nibbana" wrote: Here's my data: A B 1 1-Jun-08 1-Jul-08 2 30-Jun-08 31-Jul-08 I need a formula in B1 and B2 that will: If col A date is first day of month then return first day of next month; or If col A date is last day of month then return last day of next month. Thanks! |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Another date formula
Turns out I don't need the if scenario. so these simple ones worked great,
thanks. "macropod" wrote: Hi nibbana, For A1/B1: =DATE(Year(A1),MONTH(A1)+1,1) For A2/B2: =DATE(Year(A2),MONTH(A1)+2,0) -- Cheers macropod [MVP - Microsoft Word] "nibbana" wrote in message ... Here's my data: A B 1 1-Jun-08 1-Jul-08 2 30-Jun-08 31-Jul-08 I need a formula in B1 and B2 that will: If col A date is first day of month then return first day of next month; or If col A date is last day of month then return last day of next month. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date Formula Problem - Leave date blank if Null | Excel Worksheet Functions | |||
Create a formula in a date range to locate a specific date - ecel | Excel Discussion (Misc queries) | |||
Excel Formula to calulate number of days passed from date to date | Excel Discussion (Misc queries) | |||
Formula for determining if two date columns fall within specific date range | Excel Worksheet Functions | |||
Formula for determining if two date columns fall within specific date range | Excel Discussion (Misc queries) |