Hello everyone I'm sure this has been covered a million times but I have not found a solution on the web or in one of the excel vba books I have. I am not a programmer just a spreadsheet user that plays with simple vba to automate some spreadsheets I use at work.
What I am trying to do is copy data in 2 columns that sets a start and stop for a vlookup. from the v lookup I average the results then paste the results back in my data table.
I never know how many lines of data I will have so to me in seems like a do while loop should be the best. I'm just not sure how to implement it.
If i record a macro it looks like this for the first line.
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 6/27/2012 by Charles Dugger
'
'
Range("J32:K32").Select
Selection.Copy
Range("J26").Select
ActiveSheet.Paste
Range("O26").Select
Application.CutCopyMode = False
Selection.Copy
Range("O32").Select
Application.Run "PERSONAL.XLS!pastspecal"
End Sub
Help how in the world do I set this up in a loop.
Sorry if this is a first grade question but this has been bugging me for a week with no progress and I have tried with zero luck.
What I am trying to do is copy data in 2 columns that sets a start and stop for a vlookup. from the v lookup I average the results then paste the results back in my data table.
I never know how many lines of data I will have so to me in seems like a do while loop should be the best. I'm just not sure how to implement it.
If i record a macro it looks like this for the first line.
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 6/27/2012 by Charles Dugger
'
'
Range("J32:K32").Select
Selection.Copy
Range("J26").Select
ActiveSheet.Paste
Range("O26").Select
Application.CutCopyMode = False
Selection.Copy
Range("O32").Select
Application.Run "PERSONAL.XLS!pastspecal"
End Sub
Help how in the world do I set this up in a loop.
Sorry if this is a first grade question but this has been bugging me for a week with no progress and I have tried with zero luck.