Codes needed to update wages
Here one shot at it:
Sub payBoost()
Dim lr As Long, sh As Worksheet, rng As Range
Dim fRng As Range
Set sh = ActiveSheet
lr = sh.Cells(Rows.Count, 1).End(xlUp).Row
Set rng = sh.Range("A2:A" & lr)
Set c = rng.Find(InputBox("Enter an ID number.", "ID NUMBER"), _
LookIn:=xlValues)
If Not c Is Nothing Then
Set fRng = Range("F" & c.Row)
fRng = fRng.Value + (fRng.Value * 0.045)
End If
End Sub
This will ask the user to input an identification number. It will then find
that number in column A and add 4.5% to the amount shown in column F and
post the new value to column F.
"Tom" wrote in message
...
Hi,
Column A of Sheet1 holds the identity numbers of about 200 casual members
of our staffs. Column F shows their current weekly wages. I need a simple
macro that allows me to update the weekly wages for some of these members
by 4.5% from a list of their identity numbers shown in Column A of Sheet2.
Any help is much appreciated.
TIA
Tom
|