Excel Macro If Statement Error
Closed
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.
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:
- Excel Macro If Statement Error
- Network error occurred - Guide
- Fenix internet on bank statement - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Cmos checksum error - Guide
- Spell number in excel without macro - Guide
1 response
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
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