LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Append columns to existing worksheet?

I need to create a VBA function that will append a set of 10 columns from one
worksheet to a row of another worksheet when a certain column in both
worksheets has the same value. I am familiar with VBA, but I'm a newb to
Excel, so I'm not quite sure how to do this.

Specifically, I need to use the title of a book as the matching criteria.
This is somewhat complicated by the fact that one worksheet just has a Title
column whereas the other has columns for both Title and Subtitle. In any
case, when the two columns match I need to append a set of 10 columns (I
figure I can probably just use a range for this) to the row in which the
match was found.

I don't know the proper syntax, but it should look something like this:

For Each Row in Worksheet
If Worksheet1.Title = Worksheet2.Title OR
(Worksheet1.Title & ": " & Worksheet1.Subtitle) = Worksheet2.Title
THEN
APPEND Worksheet2.Range(A-J)
Next Row

So, the idea is to cycle through all the rows in the worksheet, check
whether or not the titles are the same, and if so, append the named range to
the end of the row in Worksheet1.

Does anyone know how to do this? Any help would be appreciated.

Thanks,

Chris
 
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
how can I Append values to an existing excel file. viv New Users to Excel 0 March 21st 07 11:25 AM
How do I paste to append instead of replace existing data? Joel Thomas Excel Discussion (Misc queries) 1 October 3rd 05 01:32 PM
How do I create an excel macro to append to a cell with existing i zola_tiara Excel Discussion (Misc queries) 4 September 14th 05 08:22 PM
How to append existing series? Michael C via OfficeKB.com Charts and Charting in Excel 1 August 20th 05 03:17 PM
Macro to append onto and then sort a pre-existing list Helen Sun Excel Programming 1 December 8th 04 01:32 AM


All times are GMT +1. The time now is 03:14 AM.

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

About Us

"It's about Microsoft Excel"