Moving data Between Two sheets

N

nitn28

hello everyone

i m novice to Vba n trying to solve a problem , i never moved data
between two sheets so stucked here

my querry is i have some data in sheet1 and some "formula set" in
Sheet2

wat i want to do is to move column1 and column 3 of "sheet1" to
column 1 & column2 "sheet2' then apply the formula i have in sheet2
gets results in column3 [sheet2]
and send these values bach to "sheet1" in column6


and then move again to column 5 & column 7 of sheet1 and repeat the
above procedure till all the coumns get results

sorry if i havnt framed my question properly but please let me knw i
wil put it other way round

hope i wil get direction from experts here

many thanks
plz reply
 
J

Joel

I think you want something like this. I believve you need to copy only
values from shedett 2 back to sheet 1.



Sub BetweenSheets()

Sheets("Sheet1").Activate
'get last column on sheet1
LastCol = Sheets("Sheet1"). _
Cells(1, Columns.Count).End(xlToLeft).Column

For ColumnCount = 1 To LastCol Step 4

Sheets("sheet1").Cells(1, ColumnCount).EntireColumn.Copy _
Destination:=Sheets("sheet2").Cells(1, "A")
Sheets("sheet1").Cells(1, ColumnCount + 2).EntireColumn.Copy _
Destination:=Sheets("sheet2").Cells(1, "B")

Sheets("sheet2").Cells(1, 3).EntireColumn.Copy
Sheets("sheet1").Cells(1, ColumnCount + 5).PasteSpecial _
Paste:=xlPasteValues

Next ColumnCount

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top