Hi,
As part of a larger VBA project, I need to check 4 columns to see if any values have been incorrectly entered - values need to be entered by the user as whole numbers without leading zeros, so "3" not "0.03". As such, I need to check to see if there are any cells in the column ranges containing "0.0"s - if there are, I have already devised a fix for that, but if there aren't, I need it to skip the FIX stage and move onto the next stage, which is called: COVER. Below is what I have devised to determine whether there are any "0.0"s in the ranges but I don't know how get it to skip on to the COVER section if there are no "0.0"s.
Hope some one can please advise.
Many thanks.
As part of a larger VBA project, I need to check 4 columns to see if any values have been incorrectly entered - values need to be entered by the user as whole numbers without leading zeros, so "3" not "0.03". As such, I need to check to see if there are any cells in the column ranges containing "0.0"s - if there are, I have already devised a fix for that, but if there aren't, I need it to skip the FIX stage and move onto the next stage, which is called: COVER. Below is what I have devised to determine whether there are any "0.0"s in the ranges but I don't know how get it to skip on to the COVER section if there are no "0.0"s.
Hope some one can please advise.
Many thanks.
VBA Code:
'Determine if any 'Contribution Rate' columns contain "0.0" - if they do, go to FIX
Last = Cells(Rows.Count, "A").End(xlUp).Row
For I = Last To 1 Step -1
If (Cells(I, "Y").Value) Like "0.0*" Then GoTo FIX
Next I
For I = Last To 1 Step -1
If (Cells(I, "Z").Value) Like "0.0*" Then GoTo FIX
Next I
For I = Last To 1 Step -1
If (Cells(I, "AA").Value) Like "0.0*" Then GoTo FIX
Next I
For I = Last To 1 Step -1
If (Cells(I, "AB").Value) Like "0.0*" Then GoTo FIX
Next I
FIX:
'Fix code goes here
COVER: