![]() |
Help with dates!! Excel 2003
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? |
Help with dates!! Excel 2003
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. "Susan" wrote: 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? |
Help with dates!! Excel 2003
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. Susan wrote: 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? -- Dave Peterson |
Help with dates!! Excel 2003
Thank you!
I changed one of the worksheets! "Dave Peterson" wrote: 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. Susan wrote: 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? -- Dave Peterson |
All times are GMT +1. The time now is 07:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com