Excel Macro If Statement Error

Closed
Wolf - Jun 29, 2012 at 02:06 PM
 Blocked Profile - Jun 30, 2012 at 03:21 AM
Hello,

The following If statement is being evaluated as false when in fact it is true:

If ActiveCell = ActiveCell.Offset(0, 1) Then
MsgBox "The Total of all records " & ActiveCell & " agree to the Citidirect total, the macro will proceed", , "Records Balanced"

Note that Activecell is the sum which equals B68 = 1475376.98 cell c68 is a constant 1475376.98. When I test them in the sheet itself. i.e., b68 = c 68 the result is True. The weird thing is I've run this on other sheets and it evaluates correctly.



Related:

1 response

Blocked Profile
Jun 30, 2012 at 03:21 AM
Greetings,

Please, bare in mind that Kioskea is a mutual aid community, all answers on the forum are provided by volunteers who give their time free to help solve issues.

Therefore, it is specifically requested from Kioskea forum users correspond showing mutual respect. Therefore, when requesting assistance, the use of polite expressions,as for elsewhere in similar circumstances, is appreciated. (please, thank you, appreciate, grateful, etc.)

https://ccm.net/apps-sites/internet-archeology/ccm/10131-terms-of-use-for-ccm-respect-for-others/#politesse

Please, copy, modify and repost your message respecting the politeness charter.

We trust that you understand.

Moderator
0