Recognising '0.00'

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

The following does not appear to recognise a cell
containing the value: 0.00

If Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Value _
= "0.00" Then

How best to amend this, please?

Regards.
 
If Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Value _
= 0 Then

If Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Text _
= "0.00" Then

If Format(Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Value, _
"0.00") = "0.00" Then


The value stored in such a cell would be zero. It is formatted to display
as 0.00 perhaps, but the value stored is zero. .Text will give you what is
displayed, .value will give you what is stored.
 
Understood. Many thanks.

Regards.

Tom Ogilvy said:
If Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Value _
= 0 Then

If Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Text _
= "0.00" Then

If Format(Pagevarr(j + 1).Offset(-1, ColsToPrint - 1).Value, _
"0.00") = "0.00" Then


The value stored in such a cell would be zero. It is formatted to display
as 0.00 perhaps, but the value stored is zero. .Text will give you what is
displayed, .value will give you what is stored.
 
Back
Top