Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default matching data in VBA

Hi

I have two columns in the 6th sheet of a workbook. This sheet's name
changes every time the macro is run e.g. Now it is Sheet12 but it could
be Sheet13 next time I run the macro.

One column is generated via a pivot table - starting cell ref =a5. The
other is from a filter source data list and copy pasted - starting cell
ref = e5.

I need to match the codes and where the pivot table does not show the
codes listed in column e, I need to identify these codes and extract
them out into a new column.

I then need to go back to the source workbook and copy all the rows
that match those codes.

column a
A&L002 1
AAL002 1
AAL003 1
ABS002 1
ADA001 1
AEY369 1
AEY370 1
AEY371 1
AEY372 1
AEY373 1
AEY374 1

column e
A&L002
ABS002
AEY369
AEY371
AEY372
AEY373
AEY374
AEY376
AEY377
AEY378
AEY379

These columns may be different lengths according to how many new codes
there are each week AND the number of codes may change so the ranges
need to be dynamic also. The number beside the first column (pivot
data) is just how i determine whether the old code is current.

I am having trouble in VBA working out this code. Can anyone please
assist?


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default matching data in VBA

I have found two formulas in excel which will do the first part of thi
but am not sure how to convert them to vba and then do the find, cop
from one workbook and paste into the second.

=IF(COUNTIF($A$1:$A$10,B1)=0,B1,"") which extracts and then

=IF(ROW()-ROW(NoBlanksRange)+1ROWS(BlanksRange)-
COUNTBLANK(BlanksRange),"",INDIRECT(ADDRESS(SMALL(
(IF(BlanksRange<"",ROW(BlanksRange),ROW()+ROWS(Bl anksRange))),
ROW()-ROW(NoBlanksRange)+1),COLUMN(BlanksRange),4)))

(these are from http://www.cpearson.com/excel/noblanks.htm to give th
credit:))

can anyone please assist?

cheers

rebecc

--
Message posted from http://www.ExcelForum.com

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
Enter Data on one tab, then find matching data on another tab Derek Excel Worksheet Functions 2 October 16th 09 02:37 AM
Matching a column of new data to existing larger data set. Sirjay Excel Worksheet Functions 1 April 21st 08 05:05 PM
Matching identical data using data only once in the matching proce Robert 1 Excel Discussion (Misc queries) 1 June 29th 07 04:22 PM
Can I merge data in 2 sheets matching rows of data by last name? Corb Excel Discussion (Misc queries) 1 March 18th 07 05:32 PM
Matching data and linking it to the matching cell yvonne a via OfficeKB.com Links and Linking in Excel 0 July 13th 05 07:30 PM


All times are GMT +1. The time now is 01:40 PM.

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"