I am new to VBA and need some help with this problem.
I have 8 columns and each column has 9 rows. I want to copy each column and paste it to another sheet at a specific range.
How can i code the following statement? "Go to sheet2 and copy the first column and 2-9 rows and paste it to sheet1 in the range("C3:C10") and then press solver do some other staff and when all these are done go to the next column and do the same again".
I found how can I do this for one column but I can't find how to do the loop. Here is the code I've wrote for the first column. I want to do the same for all 8 columns.
Sub test1()
Worksheets("sheet 1").Range("c3:c10").Value = Worksheets("Sheet 2").Range("A2:A9").Value
Worksheets("Sheet 1").Range("C17").Value = "Y"
Worksheets("Sheet 1").Range("C32").Value = "Y"
SolverOk SetCell:="$E$96", MaxMinVal:=3, ValueOf:=Range("C104").Value,
ByChange:="$C$100", _
Engine:=1, EngineDesc:="GRG Nonlinear"
SolverSolve True
Worksheets("Sheet 3").Range("J2").Value = Worksheets("Sheet 1").Range("L24").Value
End Sub