ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   comparing values in excel with vb6 (https://www.excelbanter.com/excel-programming/304066-comparing-values-excel-vb6.html)

jim_budd \(removethis\) @csgsystems.com

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!






















Tom Ogilvy

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!

























All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com