Thread: Date
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
alf alf is offline
external usenet poster
 
Posts: 4
Default Date

On 26 Jan., 09:34, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
If you had actually inserted Nov-08 as an Excel date, =H1-1 would have shown
Oct-08, because Nov-08 as a date defaults to 1-Nov-08 and subtracting 1
would give 31-Oct-08.
My guess is that you've got a text string in H1. *Check with the formulae
=ISTEXT(H1) and ISNUMBER(H1), and by trying to reformat H1 temporarily as a
different date format such as dd/mmm/yyyy; *if the display in H1 doesn't
change, you've got text, not a date.

You confused me a little by referring to the "date format and date
function". *If you used the DATE function, could you show us what foirmula
you used?
--
David Biddulph

"alf" wrote in message

...

Hi there!


I inserted a date, for example (Nov-08) in the cell H1 of an excel
sheet. I have used the date format and date function.
Now, I'd like the software to automatically fill out the adjacent cell
(s) [G1] with the previous month(s), e.g.: Oct-08.


I got surprised to see that writing "=H1-1" in cell G1 doesn't make it
happen; it just copies "Nov-08".
Can you give me a help?


Thank you in advance for your support!


best,
alf


Hi David,


Thanks for your swift reply!

I'll start to inform you on what you asked:
1. Excel Date didn't show Oct 08 in G1, in spite of putting Nov-08 as
an excel date in Hi, because I had inserted as a Date function the
last day of November [=DATE(2008;11;30)]
2. Have used the formulae istext and isnumber and I have no texts,
just dates

Now I'll reformulate the problem:

Excel is working in a logical way (putting in G1 the 29th of November,
in F1 the 28th of November etc.) - I understand it now based on your
explanation, but my objective is to have on cell G1 Oct 08, on cell F1
Sep 08 etc.
I have tried this by inserting in G1 the function =H1-30. This works
for most of the months (Now I can live with this, by correcting the
few wrong ones), but not with all (Probably because of the months with
31 days).
My new question is: is there a way to avoid these manual corrections?

Thanks!