Supernerd81
New Member
- Joined
- Jun 16, 2023
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
Hi,
I am trying to automate our price increases. Unfortulately I don't know much about excel vba. What I want:
Take the old price in column C, multiply by the value in F2, roundup to the nearest 10 and paste it in column B.
I am currently using a formula which I copy paste every row:
I am trying to automate this with a macro, but thus far I have no succes. This is what I have:
This at least copies my values in column B (and leaves the 'price on request') but I still have to multiply the entire column. Does anyone have a suggestion on how I can do that? The simple ROUNDUP function doesn't seem to work in VBA?
Thanks!
I am trying to automate our price increases. Unfortulately I don't know much about excel vba. What I want:
Take the old price in column C, multiply by the value in F2, roundup to the nearest 10 and paste it in column B.
I am currently using a formula which I copy paste every row:
Excel Formula:
=ROUNDUP((C2*$F$2);-1)
I am trying to automate this with a macro, but thus far I have no succes. This is what I have:
VBA Code:
Sub Copypaste()
Dim SrchRng As Range, cel As Range
Set SrchRng = Range("C2:C200")
For Each cel In SrchRng
If cel.Value <> "" Then
cel.Offset(0, -1).Value = cel.Value
End If
Next cel
End Sub
This at least copies my values in column B (and leaves the 'price on request') but I still have to multiply the entire column. Does anyone have a suggestion on how I can do that? The simple ROUNDUP function doesn't seem to work in VBA?
Thanks!