ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   MONTH function (https://www.excelbanter.com/excel-worksheet-functions/238718-month-function.html)

Charlie

MONTH function
 
How do I get around the MONTH(cell) function returning 1 (Jan) when evaluated
against what I consider to be an empty date cell?

I'm using it within ...
IF(ISNA(VLOOKUP(MONTH(cell),LookupMonth,2,FALSE)), "NA",VLOOKUP(MONTH(I12),LookupMonth,2,FALSE))

I was expecting it to return NA



Per Jessen

MONTH function
 
Hi

Try this:

=IF(cell="","NA",IF(ISNA(VLOOKUP(MONTH(cell),Looku pMonth,2,FALSE)),"NA",VLOOKUP(MONTH(I12),LookupMon th,2,FALSE)))

Regards,
Per

"Charlie" skrev i meddelelsen
...
How do I get around the MONTH(cell) function returning 1 (Jan) when
evaluated
against what I consider to be an empty date cell?

I'm using it within ...
IF(ISNA(VLOOKUP(MONTH(cell),LookupMonth,2,FALSE)), "NA",VLOOKUP(MONTH(I12),LookupMonth,2,FALSE))

I was expecting it to return NA




Charlie

MONTH function
 
Thanks Per. Works a dream. You're a star.

"Per Jessen" wrote:

Hi

Try this:

=IF(cell="","NA",IF(ISNA(VLOOKUP(MONTH(cell),Looku pMonth,2,FALSE)),"NA",VLOOKUP(MONTH(I12),LookupMon th,2,FALSE)))

Regards,
Per

"Charlie" skrev i meddelelsen
...
How do I get around the MONTH(cell) function returning 1 (Jan) when
evaluated
against what I consider to be an empty date cell?

I'm using it within ...
IF(ISNA(VLOOKUP(MONTH(cell),LookupMonth,2,FALSE)), "NA",VLOOKUP(MONTH(I12),LookupMonth,2,FALSE))

I was expecting it to return NA






All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com