ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Still have a date problem (https://www.excelbanter.com/new-users-excel/54104-still-have-date-problem.html)

Box666

Still have a date problem
 
In cell B6 i have a date in the format dd-mmm-yyyy, when I use the
following formula whilst it gives the correct answer ... when I use the
answer in a further formula it is not recognised.

I am guesing that one is a numeric and the other is an alpha answer. (
I have also noticed that the item in B6 sits to the right of the cell,
while the formula answer sits to the left of its cell.)

=IF(B6=" ";" ";(TEXT(DATE(YEAR(B6)-1;MONTH(B6)-0;1);"dd-mmm-yyyy")))


How do I change the above formula so it ends up as a numeric date
answer, but still in the format of dd-mmm-yyyy.


Niek Otten

Still have a date problem
 
=IF(B6=" ";" ";DATE(YEAR(B6)-1;MONTH(B6)-0;1))

But maybe you mean

=IF(B6="";"";DATE(YEAR(B6)-1;MONTH(B6)-0;1))

In both cases, format as dd-mmm-yyyy

--
Kind regards,

Niek Otten

"Box666" wrote in message
ups.com...
In cell B6 i have a date in the format dd-mmm-yyyy, when I use the
following formula whilst it gives the correct answer ... when I use the
answer in a further formula it is not recognised.

I am guesing that one is a numeric and the other is an alpha answer. (
I have also noticed that the item in B6 sits to the right of the cell,
while the formula answer sits to the left of its cell.)

=IF(B6=" ";" ";(TEXT(DATE(YEAR(B6)-1;MONTH(B6)-0;1);"dd-mmm-yyyy")))


How do I change the above formula so it ends up as a numeric date
answer, but still in the format of dd-mmm-yyyy.





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

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