I
intoit
Hi,
I'm using the code below to enter the word 'more' or 'less' within a
particular cell, contingent upon the numerical values within two other cells.
It works when I run the macro once, but if one alters the values within the
two numerical cells, and the macro is run again, the code does not adjust to
change the word 'more' or 'less'. It seems to get stuck with repeating the
same 'less' or 'more' over and over again (irrespective of the numercial
values within the cells)? Any ideas how the code can be modified so that it
can be run more than once? Thanks.
If ("Compare_Role!B16.Text") > ("Compare_Role!C16.Text") Then
Range("Compare_Role!E16") = "more"
ElseIf ("Compare_Role!B16.Text") < ("Compare_Role!C16.Text") Then
Range("Compare_Role!E16") = "less"
End If
I'm using the code below to enter the word 'more' or 'less' within a
particular cell, contingent upon the numerical values within two other cells.
It works when I run the macro once, but if one alters the values within the
two numerical cells, and the macro is run again, the code does not adjust to
change the word 'more' or 'less'. It seems to get stuck with repeating the
same 'less' or 'more' over and over again (irrespective of the numercial
values within the cells)? Any ideas how the code can be modified so that it
can be run more than once? Thanks.
If ("Compare_Role!B16.Text") > ("Compare_Role!C16.Text") Then
Range("Compare_Role!E16") = "more"
ElseIf ("Compare_Role!B16.Text") < ("Compare_Role!C16.Text") Then
Range("Compare_Role!E16") = "less"
End If