View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] chitiksha@gmail.com is offline
external usenet poster
 
Posts: 1
Default Search for rows in one sheet and copy into another sheet based on customer id

Hi,

I need someone to help with excel sheets and I do not have much
experience with it.
I have two workbooks: 1. Workbook 1 and 2. Workbook 2

Both of these workbooks contain the same no of EXCEL sheets which is
1. Customer sheet, 2. Address sheet 3. Email sheet, 4. Phone sheet

Workbook 1: Before Process contains data before a certain cleansing
process was run
Workbook 2: After Process contains data after a certain cleansing
process was run

All of the worksheets in both the workbooks contain a common field in
cloumn 1 which is the customer id.

Hence Customer sheet contains:
Customer id First Name Last Name Suffix Age
1 John Doe Jr 23
2 Jane Smith 32

The Address sheet contains:
Customer id Addl1 City State
Zip Type
1 123Main LA CA
XXXX Home
1 456Bea LA CA
XXXX Work
2 789abc LA CA
XXXX Billing
2 234xyz LA CA
XXXX Work

Etc. The same data is present in the sheets in Workbook2 but just
cleaned out.

I have a worksheet# 3 which I want to copy with the rows from the two
workbooks which match
the provided customer id. Customer id is selected manually and put
into workbook3.

Thus, if customer id = 1 is plugged into workbook 3 all the rows from
workbows1&2 with customer id = 1 in column 1 shall be selected and
copied into workbook 3. Hence workbook 3 shall contain.

Customer
1 John Doe Jr 23
Address
1 123Main LA CA
XXXX Home
1 456Bea LA CA
XXXX Work
etc

Hence,
I want to populate the third workbook based on a customer id which is
selected manually.
The customer id is present in in all the sheets within the workbooks
1& 2 as column 1

Can someone provide a macros/way as to be able to
1. Search two workbooks based on customer id
2. Populate all the matched rows into workbook3

Thanks