Help with dates!! Excel 2003

  • Thread starter Thread starter Susan
  • Start date Start date
S

Susan

I have two spreadsheets and i am trying to do a HLOOKUP however i get a #N/A

The problem: They both have the date 10/1/07 but if i change the one date
to 9/30/03 it will do the look and when i change the dates to general, the
numbers match with the different dates but not if they are both 10/1/07.

Please help! Any solutions, what causes this?
 
In the HLOOKUP use Datevalue("8/21/08") for the lookup value. The dates are
stored as numbers with 1 equaling Jan 1, 1900. It doesn't matter how you
format the cell the number value will still be the same.
 
There's a setting that each workbook can have that determines the starting date
for excel.

In xl2003, it's under:
tools|options|calculation tab|check (or uncheck) 1904 date system

Most wintel users have this unchecked. Most Mac users check this.

But in your case, one workbook is using the 1904 date system and one workbook is
not.

You could uncheck this option and change all the dates in that workbook so that
the dates are consistent (checking the option in both workbooks is another way).

Saved from a previous post:

One workbook was using a base year of 1900 and the other was using 1904.
(tools|options|calculation tab|1904 date system)

One way to add those four years back is to find an empty cell, put 1462 into
that cell.

Copy that cell.

Select your range that contains the dates. Edit|PasteSpecial|click Add (in the
operation box).

You may have to reformat the cell as a date (mine turned to a 5 digit number).
But it should work.

You may want to do it against a copy...just in case.

(I'm not sure which one you'll fix. You may want to edit|pastespecial|click
subtract.)

Most windows users use 1900 as the base date. Mac users (mostly??) use 1904 as
the base date.

=============================

If you don't want to change the workbook's option and all its dates, you could
change your =hlookup() formula:

=hlookup(a1+1462, ....
or
=hlookup(a1-1462, ....

Depending on what workbook is using what option.
 
Thank you!

I changed one of the worksheets!

Dave Peterson said:
There's a setting that each workbook can have that determines the starting date
for excel.

In xl2003, it's under:
tools|options|calculation tab|check (or uncheck) 1904 date system

Most wintel users have this unchecked. Most Mac users check this.

But in your case, one workbook is using the 1904 date system and one workbook is
not.

You could uncheck this option and change all the dates in that workbook so that
the dates are consistent (checking the option in both workbooks is another way).

Saved from a previous post:

One workbook was using a base year of 1900 and the other was using 1904.
(tools|options|calculation tab|1904 date system)

One way to add those four years back is to find an empty cell, put 1462 into
that cell.

Copy that cell.

Select your range that contains the dates. Edit|PasteSpecial|click Add (in the
operation box).

You may have to reformat the cell as a date (mine turned to a 5 digit number).
But it should work.

You may want to do it against a copy...just in case.

(I'm not sure which one you'll fix. You may want to edit|pastespecial|click
subtract.)

Most windows users use 1900 as the base date. Mac users (mostly??) use 1904 as
the base date.

=============================

If you don't want to change the workbook's option and all its dates, you could
change your =hlookup() formula:

=hlookup(a1+1462, ....
or
=hlookup(a1-1462, ....

Depending on what workbook is using what option.
 

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

Similar Threads


Back
Top