Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Combining Data from 2 worksheets

I have two worksheets, one has the customer's name and address, customer ID,
etc. The other contains the customer's ID and last date of purchase. How can
I combine the two?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Combining Data from 2 worksheets

Look in the help index for VLOOKUP. Or, use a FIND macro.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"gmoore" wrote in message
...
I have two worksheets, one has the customer's name and address, customer
ID,
etc. The other contains the customer's ID and last date of purchase. How
can
I combine the two?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Combining Data from 2 worksheets

One easy, generic option is index/match. This should get you going strongly ..

I'd assume you want to pull over the last date of purchase from Sheet2 via
matching the cust id (unique key). Assume Sheet2 contains cust ids/last date
of purchase running in A2:B2 down

In Sheet1,
Assume cust ids in col D, running in D2 down
In E2:
=IF(ISNA(MATCH(D2,Sheet2!A:A,0)),"",INDEX(Sheet2!B :B,MATCH(D2,Sheet2!A:A,0)))
Format as date to taste, copy down to return the desired last date of
purchase. Non-matching cases (if any) will return blanks: "". This part:
INDEX(Sheet2!B:B .. is what you want returned as the results. It can be a col
to the left or right of the match col. Easily adjust the expression to suit
your actual data / sheetname set-up. Cross-apply it elsewhere to do likewise
with consumate ease. Success? Thump the air, hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"gmoore" wrote:
I have two worksheets, one has the customer's name and address, customer ID,
etc. The other contains the customer's ID and last date of purchase. How can
I combine the two?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Combining Data from 2 worksheets

To be on the safe side I set up the sheet exactly as you explained
below....still no luck. No data was returned just the green triangle in the
top left corner. I cut and pasted the formula to make sure there were no
errors in my typing.
Would the formating have anything to do with why it's not returning the data?

"Max" wrote:

One easy, generic option is index/match. This should get you going strongly ..

I'd assume you want to pull over the last date of purchase from Sheet2 via
matching the cust id (unique key). Assume Sheet2 contains cust ids/last date
of purchase running in A2:B2 down

In Sheet1,
Assume cust ids in col D, running in D2 down
In E2:
=IF(ISNA(MATCH(D2,Sheet2!A:A,0)),"",INDEX(Sheet2!B :B,MATCH(D2,Sheet2!A:A,0)))
Format as date to taste, copy down to return the desired last date of
purchase. Non-matching cases (if any) will return blanks: "". This part:
INDEX(Sheet2!B:B .. is what you want returned as the results. It can be a col
to the left or right of the match col. Easily adjust the expression to suit
your actual data / sheetname set-up. Cross-apply it elsewhere to do likewise
with consumate ease. Success? Thump the air, hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"gmoore" wrote:
I have two worksheets, one has the customer's name and address, customer ID,
etc. The other contains the customer's ID and last date of purchase. How can
I combine the two?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Combining Data from 2 worksheets

Your data is inconsistent, probably the cust ids in Sheet2's col A are text
nums while your lookup values in D2 down are real nums.

Try this slightly revised, the &"" bit will convert the lookup values in D2
down to text numbers for consistent matching:
=IF(ISNA(MATCH(D2&"",Sheet2!A:A,0)),"",INDEX(Sheet 2!B:B,MATCH(D2&"",Sheet2!A:A,0)))

voila?
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"gmoore" wrote:
To be on the safe side I set up the sheet exactly as you explained
below....still no luck. No data was returned just the green triangle in the
top left corner. I cut and pasted the formula to make sure there were no
errors in my typing.
Would the formating have anything to do with why it's not returning the data?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Combining Data from 2 worksheets

The first two cells in column E merged together with this formula.....????
Still no data.

"Max" wrote:

Your data is inconsistent, probably the cust ids in Sheet2's col A are text
nums while your lookup values in D2 down are real nums.

Try this slightly revised, the &"" bit will convert the lookup values in D2
down to text numbers for consistent matching:
=IF(ISNA(MATCH(D2&"",Sheet2!A:A,0)),"",INDEX(Sheet 2!B:B,MATCH(D2&"",Sheet2!A:A,0)))

voila?
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"gmoore" wrote:
To be on the safe side I set up the sheet exactly as you explained
below....still no luck. No data was returned just the green triangle in the
top left corner. I cut and pasted the formula to make sure there were no
errors in my typing.
Would the formating have anything to do with why it's not returning the data?


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Combining Data from 2 worksheets

Lost you there. Can you paste some sample data, the cust ids in Sheet2's col
A, and the cust ids in Sheet1's D2 down?
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"gmoore" wrote in message
...
The first two cells in column E merged together with this formula.....????
Still no data.



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
Combining Data on two worksheets Gemi Excel Discussion (Misc queries) 2 December 11th 08 02:14 PM
combining data from two worksheets David Excel Worksheet Functions 1 October 10th 06 09:02 AM
Combining data from 2 worksheets naulerich Excel Worksheet Functions 1 March 17th 06 01:21 PM
Combining data from 2 worksheets naulerich Excel Discussion (Misc queries) 0 March 17th 06 12:47 PM
Combining data from several worksheets Johnny T New Users to Excel 4 May 30th 05 07:22 PM


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