Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Transfering Data From One Workbook to Another.

Dear All,
I'm still teaching myself VBA, and there's a huge problem whose
solution i cannot figure out. Your help would be greatly appreciated.
i have an input workbook from which to extract data to another
workbook (thus 2 different workbooks. The input sheet has data split
up in five categories. Each category has five rows of data. So say
the
categories are titled: A, B, C, D, and E in column A. With each
category separated by five rows, each row (in column C) has different
numbers. The output sheet (in the other workbook) has all categories
A, B, C, D, and E arranged (not alphabetically) in separate rows
(column 1), with each category separated by five empty rows. The
solution i desperately need is for a macro to input data within their
matching category in the input sheet. I think this means that it has
to check that the category within the input sheet matches that in the
output sheet, so that it can place that categories data in the right
category's columns. again, your help will be highly appreciated.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Transfering Data From One Workbook to Another.


I won't write the entire solution. Ihave poste code like this plenty of
time but will explain the process


Set SourceSht = workbooks("book1.xls")
Set DestSht = workbooks("book2.xls")


with Sourcesht
for colcount = 1 to 5
HeaderName = .Cells(1,ColCount)

with DestSht

set c = .rows(1).find)what:=HeaderName, _
lookin:=xlvalues,lookat:xlwhole)
if c is nothing then
msgbox("Cannot find Header : " & HeaderName)
else
'c.column is the matching column in the destination sheet
end if
end with
next colcount
end with


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=179210

Microsoft Office Help

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
transfering data from a one workbook to another workbook David Shoemaker Excel Programming 6 January 7th 10 06:15 PM
Transfering Workbook doss04 Excel Discussion (Misc queries) 3 October 21st 08 11:41 AM
Transfering 100 named ranges to an another workbook Oldjay Excel Discussion (Misc queries) 2 August 8th 07 07:40 PM
Transfering Data To another Workbook or Sheet Crowbar via OfficeKB.com Excel Programming 1 October 27th 05 03:48 PM
Formulas not working after transfering to new workbook Mark Jackson Excel Worksheet Functions 5 December 15th 04 06:17 PM


All times are GMT +1. The time now is 04:57 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"