Still have a date problem

B

Box666

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.
 
N

Niek Otten

=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
 

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