ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Moving data Between Two sheets (https://www.excelbanter.com/excel-programming/389009-moving-data-between-two-sheets.html)

[email protected]

Moving data Between Two sheets
 
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


joel

Moving data Between Two sheets
 
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


" wrote:

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



[email protected]

Moving data Between Two sheets
 
hi mr joel it worked fine

many thanxz..........
hav a nice time ahead




All times are GMT +1. The time now is 11:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com