Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combining Data on two worksheets | Excel Discussion (Misc queries) | |||
combining data from two worksheets | Excel Worksheet Functions | |||
Combining data from 2 worksheets | Excel Worksheet Functions | |||
Combining data from 2 worksheets | Excel Discussion (Misc queries) | |||
Combining data from several worksheets | New Users to Excel |