Hello, I'm new to this forum and new to VBA also. I've done a week of solid research and after gathering advice and help from all over the place I gathered the following code which worked perfectly for my original idea. I wanted to increase the rrp of an item if it had a profit margin was less than 50p until that margin was greater than 50p. Here is the code I have that works: (I'm sorry about the way I write this, I don't know how it should be indented.
Private Sub Looping()
Range("AA2").select
Do Until ActiveCell.Select = ""
IF ActiveCell.Select < 0.50 Then
Do Until ActiveCell.Value > 0.50
ActiveCell.Offset(0,-16) = ActiveCell.Offset(0,-16) + 0.05
Loop
Else
End If
ActiveCell.Offset(1,0).Select
Loop
End Sub
Now I want to add another IF. Do I need to add a statement something like:
Else If ActiveCell.Select >5 Then
Do Until ActiveCell.Value <5
ActiveCell.Offset(0,-16) = ActiveCell.Offest(0,-16) - 0.10
Loop
I've tried to adapt the current code but it just loops the first statement and completely ignores the second.
Massive appreciation to anyone who can tell me what I need to do in order to get this working.
Thanks in advance.
Bookmarks