I just started trying to learn VBA this week so I am very inexperienced. My situation is as follows:
I have a column of data on Worksheet 1.
I want the first cell in that list to be copied into a specific cell on Worksheet 3.
Once the cell on Worksheet 3 is populated there will be calculations carried out based upon the value of the copied cell.
I then want those calculations to be copied back to Worksheet 1 right next its corresponding value.
I then want the VBA to do the same thing for the rest of the cells in the column.
The end result should be that with the click of a button the code will put all of the calculations next the the corresponding original values on Worksheet 1.
I am fine up until when I need the code to proceed onto the next values. Do I need a loop to accomplish my goal?
I have attached my file so that it can be viewed.
My codes are as follows:
Private Sub CommandButton1_Click()
Module1.Check_Cell
End Sub
Sub Check_Cell()
If IsEmpty(Sheet1.Range("A2")) = False Then
Call CopyPasteTicker
End If
End Sub
Sub CopyPasteTicker()
Sheet1.Select
Range("A2").Select
Selection.Copy
Sheet3.Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheet3.Select
Range("B1:D1").Select
Selection.Copy
Sheet1.Select
Range("B2:D2").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
Thanks!
Bookmarks