I'm a total novice to VBA - everything I've "coded" so far, has purely come from the Record Macro function. The macro works, but it is incredibly clunky. Essentially what I'm trying to do is to run a goal seek function, take that answer, and put it into a cell. Next, I'd increment to the next input, and do the process again (and then 38 more times). Here are the first 2 increments:
Range("B11").Select
ActiveCell.FormulaR1C1 = "=R[-8]C[13]"
Range("C37:D37").Select
Range("C37").GoalSeek Goal:=0, ChangingCell:=Range("A33")
Range("A33:B37").Select
Selection.Copy
Range("P3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("R11").Select
Range("B11").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[-7]C[13]"
Range("C37:D37").Select
Range("C37").GoalSeek Goal:=0, ChangingCell:=Range("A33")
Range("A33:B37").Select
Selection.Copy
Range("P4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("P5").Select
C37:D37 is my formula for the goal seek, and A33:B37 is the output I then copy and paste into the P column. I'd like to share this code with some colleagues, but it is very unprofessional looking in it's current state. Any ideas?
Thank you!