Sub mulitplyvalues()
Dim lrow As Long, dte As Date
Dim cell As Range
lrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
For Each cell In Range("B2:f" & lrow)
dte = DateValue(Left(Cells(cell.Row, "A").Value, InStr(1, Cells(cell.Row, "a").Value, "-") - 1))
If Day(dte) < 7 Then
cell.NumberFormat = "0.00"
cell.Value = cell.Value * 123
ElseIf Day(dte) < 15 Then
cell.NumberFormat = "0.00"
cell.Value = cell.Value * 456
Else
cell.NumberFormat = "0.00"
cell.Value = cell.Value * 789
End If
Next cell
End Sub
|