Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Extracting data from workbook1 to workbook2

Hi,

I would appreciate any VBA code for the following:

I need to extract data from say ColumnA, ColumnB, ColumnE and ColumnG
from "workbook1"
and placed this data in the corresponding columns (ColumnD, ColumnF,
ColumnH, and ColumnK) in "workbook2".

Can you help?

Thanks Ranjan

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Extracting data from workbook1 to workbook2

On Mar 5, 7:05 pm, wrote:
Hi,

I would appreciate any VBA code for the following:

I need to extract data from say ColumnA, ColumnB, ColumnE and ColumnG
from "workbook1"
and placed this data in the corresponding columns (ColumnD, ColumnF,
ColumnH, and ColumnK) in "workbook2".

Can you help?

Thanks Ranjan


Sub CopyWbk
Dim src, dest
i=1
Set src=Workbooks("Workbook1").Sheets("Sheet1")
Set dest = Workbooks("Workbook1").Sheets("Sheet1")
While src.Cells(i,1)<""
dest.Cells(i,4)=src.Cells(i,1)
dest.Cells(i,6)=src.Cells(i,2)
dest.Cells(i,8)=src.Cells(i,5)
dest.Cells(i,11)=src.Cells(i,7)
i = i+1
Wend
End Sub

HTH
Kostis Vezerides

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Selected Rows From Workbook1 to WorkBook2 [email protected] Excel Discussion (Misc queries) 0 October 10th 06 11:27 PM
Copying Selected Rows From Workbook1 to WorkBook2 [email protected] Excel Discussion (Misc queries) 0 October 10th 06 11:24 PM
Extracting Data for .Txt Files By Unique Field Data La Excel Discussion (Misc queries) 3 July 17th 06 01:30 PM
workbook1 data to workbook2 data raisin Excel Worksheet Functions 1 February 1st 06 02:18 PM
autom update cells from Workbook1 to Workbook2 Bruno01 Excel Discussion (Misc queries) 0 January 28th 05 11:17 AM


All times are GMT +1. The time now is 03:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"