Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have two date fields that are linked into one master spreadsheet from two
different sources. Once in the master spreadsheet they need to be compared. When looking at the sources, they appear to both be true dates with a date format. But when I try to compare them, they do not match. I have tried to concantenate each with another field (a corresponding hour). When I perform the concantenation I find that the two dates behave differently. One stays in mm/dd/yyyy format, and the other becomes the Excel representation of a date (ie 37989 = 1/3/2004). So then I added 'TEXT' logic to the dates. They still will not compare properly. What else can I try? |
#2
![]() |
|||
|
|||
![]()
Those concatenated cells that didn't change to a number is a clue that the value
in the original cell isn't really a data--it's just text masquerading as a date. (Dates are just numbers to excel--formatted nicely for human's.) You should be able to convert your text dates to real dates by selecting your range (one column at at time) and then data|text to columns. Choose fixed width and remove any lines that excel guessed. make sure you choose the correct date style (mdy?) then plop it right over the original range. Then compare your cells once more. And if you want to concatenate cells and include that formatting, you can use: =a1&text(b1,"mm/dd/yyyy") or if a1 contained a date and b1 a time: =text(a1+b1,"mm/dd/yyyy hh:mm:ss") But this formatting is just for you. comparing two dates (even formatted differently) will match if the underlying values match. Cathy wrote: I have two date fields that are linked into one master spreadsheet from two different sources. Once in the master spreadsheet they need to be compared. When looking at the sources, they appear to both be true dates with a date format. But when I try to compare them, they do not match. I have tried to concantenate each with another field (a corresponding hour). When I perform the concantenation I find that the two dates behave differently. One stays in mm/dd/yyyy format, and the other becomes the Excel representation of a date (ie 37989 = 1/3/2004). So then I added 'TEXT' logic to the dates. They still will not compare properly. What else can I try? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date issue between Windows and Macintosh version | Excel Discussion (Misc queries) | |||
Autofilter on date fields should refelct the underlying data (rat. | Excel Discussion (Misc queries) | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
Formatting date fields after export | Excel Discussion (Misc queries) | |||
Sum function on multiple date fields | Excel Worksheet Functions |