#1   Report Post  
Posted to microsoft.public.excel.misc
nick
 
Posts: n/a
Default Formatting

im comparing dates from two workbooks. In workbook 1, i converted YYYYMMDD
format to MM/DD/YYYY to compare it with a date in workbook 2. I put an if
statement saying if(wk1a1=wk2a1,"Pass","fail")...but somehow im getting a
fail...even tho the dates in both workbooks looks the same and in the same
format. can someone help me in this? thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
swatsp0p
 
Posts: n/a
Default Formatting


Question: Are cells A1 in both sheets truly dates? Remember that Excel
stores dates as a number (e.g. May 19, 2006 = 38856). To check, change
the format of each cell to General and see if you get a number similar
to my example. If not, then you don't have true dates in each cell
(maybe one is a text entry?).

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=543766

  #3   Report Post  
Posted to microsoft.public.excel.misc
nick
 
Posts: n/a
Default Formatting

Hi...i appreciate your concern! Im getting a number when i change the format
to general. so i assume they are true dates. could you tell me what should i
do in both the scenarios? thanks

"swatsp0p" wrote:


Question: Are cells A1 in both sheets truly dates? Remember that Excel
stores dates as a number (e.g. May 19, 2006 = 38856). To check, change
the format of each cell to General and see if you get a number similar
to my example. If not, then you don't have true dates in each cell
(maybe one is a text entry?).

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=543766


  #4   Report Post  
Posted to microsoft.public.excel.misc
Abode
 
Posts: n/a
Default Formatting

Is that the exact formula and are wk1a1 and wk2a1 labels or named ranges. If
not you may be pointing to no or a wrong location. Maybe try putting =wk1a1
and =wk2a1 in two empty cells to check what value they are getting. Also you
can always use Tools Formula Auditing Evaluate Formula to see exactly
what the computer is seeing and doing. Hopefully that helps out.

"nick" wrote:

im comparing dates from two workbooks. In workbook 1, i converted YYYYMMDD
format to MM/DD/YYYY to compare it with a date in workbook 2. I put an if
statement saying if(wk1a1=wk2a1,"Pass","fail")...but somehow im getting a
fail...even tho the dates in both workbooks looks the same and in the same
format. can someone help me in this? thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR
 
Posts: n/a
Default Formatting

Try something like this:

=IF(TEXT(wk1!A1,"yymmdd")=TEXT(wk2!A1,"yymmdd"),"P ass","Fail")


--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"nick" wrote in message
...
Hi...i appreciate your concern! Im getting a number when i change the format
to general. so i assume they are true dates. could you tell me what should i
do in both the scenarios? thanks

"swatsp0p" wrote:


Question: Are cells A1 in both sheets truly dates? Remember that Excel
stores dates as a number (e.g. May 19, 2006 = 38856). To check, change
the format of each cell to General and see if you get a number similar
to my example. If not, then you don't have true dates in each cell
(maybe one is a text entry?).

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile:

http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=543766




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 07:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 03:07 AM
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 11:39 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 04:33 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"