Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default comparing values in excel with vb6

I am writing a macro that compares a date and time in
worksheetA with with a date and time in worksheetB. The
date and time are in separate columns. The time is
calculated in worksheetB from a text value (0500) imported
from a Data Base with the formula =value(left(d7,2)/24 In
worksheetA the time value is calculated with the formula
=5/24. I do a comparison to determine if these values are
equal in excel by the formula =worksheetA!b7=worksheetB!b8
and recieve a true return. The same two cells in vb do
not compare equally in an if statement and go to an else
statement the says worksheetA!b7 < worksheetB!b8. I have
tried copying the value of one cell to the other without
and change in result. Any suggestions. Thanks in advance
for your help!





















  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default comparing values in excel with vb6

The test worked for me both in Excel and in VB.

--
Regards,
Tom Ogilvy

"jim_budd (removethis) @csgsystems.com"
wrote in message
...
I am writing a macro that compares a date and time in
worksheetA with with a date and time in worksheetB. The
date and time are in separate columns. The time is
calculated in worksheetB from a text value (0500) imported
from a Data Base with the formula =value(left(d7,2)/24 In
worksheetA the time value is calculated with the formula
=5/24. I do a comparison to determine if these values are
equal in excel by the formula =worksheetA!b7=worksheetB!b8
and recieve a true return. The same two cells in vb do
not compare equally in an if statement and go to an else
statement the says worksheetA!b7 < worksheetB!b8. I have
tried copying the value of one cell to the other without
and change in result. Any suggestions. Thanks in advance
for your help!























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
Help with Comparing values and retrieving values in Excel!!!!!! [email protected] Excel Worksheet Functions 1 November 17th 06 12:21 AM
Comparing values between columns only when there are values in bot Mark K Excel Worksheet Functions 1 February 19th 06 06:47 PM
Comparing a value to a list of values does not work in Excel 2003. RagDyer Excel Worksheet Functions 3 March 29th 05 02:12 AM
comparing two values Jerry Excel Worksheet Functions 2 March 2nd 05 04:34 PM
Excel Comparing Values Paul Feltham Excel Discussion (Misc queries) 0 February 8th 05 05:21 PM


All times are GMT +1. The time now is 08:05 AM.

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"