Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro generates new sheet

Hello,

[[[------There was en error in my previous post some minutes
ago------]]]
[[[------This is the corrected post------]]]

Suppose that I have an Excel file with 2 sheets.

Sheet "2003" looks like:
ABC|Textvalue|OF|UR|FR
ABC|Textvalue|OF|UR|FR
ABC|Textvalue|OF|UR|FR
DEF|Othertextvalue|CR|UR
DEF|Othertextvalue|CR|UR
GHI|YetOthertextvalue|UI|OO
GHI|YetOthertextvalue|UI|OO
GHI|YetOthertextvalue|UI|OO

Sheet "2004" looks like:
DEF|blabla|CA|UY
DEF|blabla|CA|UY
GHI|blablabla|UT|OL
GHI|blablabla|UT|OL
GHI|blablabla|UT|OL

How can I generate a third sheet that looks like this:
DEF|blabla|CR|UR
DEF|blabla|CR|UR
GHI|blablabla|UI|OO
GHI|blablabla|UI|OO
GHI|blablabla|UI|OO

In other words, all the rows of sheet "2004" should be taken to the
new sheet, but the last two columns of each row (those with
2-character codes) should be taken from sheet "2003". The filter is in
the first column (in this example with codes ABC or DEF or GHI) to
define which rows from sheet "2003" correspond with which rows in
sheet "2004".
Rows that appear in sheet "2003" and not in sheet "2004" should not be
shown in the new sheet. Rows that appear in sheet "2004" and not in
sheet "2003" should be shown in the new sheet exactly as they are in
sheet "2004".

Is this possible in VB / macro / Excel script or so ?

Thank you for suggestions,
Bart
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
2003 macro generates compiler error on 2007 KenInPortland Excel Worksheet Functions 2 September 2nd 08 09:45 PM
Save generates unprotect sheet dialog box [email protected] Excel Discussion (Misc queries) 1 February 11th 08 05:53 PM
How to make excel sheet generates an auto number ghost Excel Discussion (Misc queries) 3 July 23rd 07 03:08 PM
cutting and pasting rows from one sheet to another generates error JT Spitz Excel Discussion (Misc queries) 7 February 14th 06 07:06 PM
Macro generates new sheet Bart Van der Donck Excel Programming 0 January 28th 04 01:28 PM


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