I have a report that I am working on. In the report one of the columns contains a number and I want to evaluate the last number and if it is not "5", I want to change it to "5".
Some Data:
<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
Most of my VBA for this spreadsheet is a loop that looks for values and makes the changes needed. The one to replace the Resource Type works fine, but I can't figure out how o look for the last digit in the PRCN.
Some Data:
A_Siteid | AB_Contractor Name | AFF_A_PRCN | AFF_B_RESOURCETYPE |
BAR | FLR ENTERPRISES | 18891 | KLO |
BAR | FLR ENTERPRISES | 19874 | KLO |
BAR | FLR ENTERPRISES | 19871 | KLO |
BAR | FLR ENTERPRISES | 18895 | KLO |
<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
Most of my VBA for this spreadsheet is a loop that looks for values and makes the changes needed. The one to replace the Resource Type works fine, but I can't figure out how o look for the last digit in the PRCN.
Code:
'Change Resource Type to "KLO".
rowa = 3
Do Until Sheet11.Cells(rowa, 2).Value = Empty
If Sheet11.Cells(rowa, 4).Value <> "KLO" Then
Sheet11.Cells(rowa, 4).Value = "KLO"
End If
rowa = rowa + 1
Loop