Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Retrieving a field from another worksheet - with conditions...

I have two worksheets. In worksheet 1, I have several columns. In worksheet
2 I have other data. I have a column that has the same information (but not
necessarily on the same row. These columns are 'ws1'!AB1:AB100 in the first
worksheet and 'ws2'!AA1:AA350 in the second worksheet.
What I need to do, in 'ws2'!D1:D350 is match the data in column
'ws2!AA1:AA350 with the column 'ws1'!AB1:AB100. IF a match is found, then
populate WS2!:Dx with the value found in ws1!Bx. "x" is the row that has the
match.
Of note, In worksheet 1, the value in AB1:AB100 is unique. In worksheet 2,
the value can be repeated several times.

Here's what I have (sofar) in 'WS2'!D2:
=IF(AA2="","", IF(ISNA(MATCH(AA2, 'ws1'!$AB$2:$AB$100,0)),"",'ws1'!B2:B100))

This almost works, but appears to return the value from the row on which the
' internal loop' is processing and not where the match actually occurs.
I want the value in WS1 column Bx where x is the row number where the match
occured.

Appreciate any help !

KSL.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Retrieving a field from another worksheet - with conditions...

In Sheet2,

Try instead in D2:
=IF(ISNA(MATCH(AA2,Sheet1!AB:AB,0)),"",
INDEX(Sheet1!B:B,MATCH(AA2,Sheet1!AB:AB,0)))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Leonhardtk" wrote:
I have two worksheets. In worksheet 1, I have several columns. In worksheet
2 I have other data. I have a column that has the same information (but not
necessarily on the same row. These columns are 'ws1'!AB1:AB100 in the first
worksheet and 'ws2'!AA1:AA350 in the second worksheet.
What I need to do, in 'ws2'!D1:D350 is match the data in column
'ws2!AA1:AA350 with the column 'ws1'!AB1:AB100. IF a match is found, then
populate WS2!:Dx with the value found in ws1!Bx. "x" is the row that has the
match.
Of note, In worksheet 1, the value in AB1:AB100 is unique. In worksheet 2,
the value can be repeated several times.

Here's what I have (sofar) in 'WS2'!D2:
=IF(AA2="","", IF(ISNA(MATCH(AA2, 'ws1'!$AB$2:$AB$100,0)),"",'ws1'!B2:B100))

This almost works, but appears to return the value from the row on which the
' internal loop' is processing and not where the match actually occurs.
I want the value in WS1 column Bx where x is the row number where the match
occured.

Appreciate any help !

KSL.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Retrieving a field from another worksheet - with conditions...

Works Perfectly! I had a little trouble at first, but it was my typo (I my
spreadsheet is on another network!).

Thanks a-million!

KSL

"Max" wrote:

In Sheet2,

Try instead in D2:
=IF(ISNA(MATCH(AA2,Sheet1!AB:AB,0)),"",
INDEX(Sheet1!B:B,MATCH(AA2,Sheet1!AB:AB,0)))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Leonhardtk" wrote:
I have two worksheets. In worksheet 1, I have several columns. In worksheet
2 I have other data. I have a column that has the same information (but not
necessarily on the same row. These columns are 'ws1'!AB1:AB100 in the first
worksheet and 'ws2'!AA1:AA350 in the second worksheet.
What I need to do, in 'ws2'!D1:D350 is match the data in column
'ws2!AA1:AA350 with the column 'ws1'!AB1:AB100. IF a match is found, then
populate WS2!:Dx with the value found in ws1!Bx. "x" is the row that has the
match.
Of note, In worksheet 1, the value in AB1:AB100 is unique. In worksheet 2,
the value can be repeated several times.

Here's what I have (sofar) in 'WS2'!D2:
=IF(AA2="","", IF(ISNA(MATCH(AA2, 'ws1'!$AB$2:$AB$100,0)),"",'ws1'!B2:B100))

This almost works, but appears to return the value from the row on which the
' internal loop' is processing and not where the match actually occurs.
I want the value in WS1 column Bx where x is the row number where the match
occured.

Appreciate any help !

KSL.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Retrieving a field from another worksheet - with conditions...

welcome, KSL.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Leonhardtk" wrote in message
...
Works Perfectly! I had a little trouble at first, but it was my typo (I
my
spreadsheet is on another network!).

Thanks a-million!

KSL



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
filtering out records from one worksheet by comparing a field in it with a field in another worksheet [email protected] New Users to Excel 0 May 9th 07 01:06 AM
Linked date field in worksheet defaults a blank field as 1/0/1900 AmnNkD Excel Worksheet Functions 2 September 12th 06 05:42 PM
Excel worksheet retrieving data from Access [email protected] Links and Linking in Excel 1 May 8th 06 12:32 AM
Retrieving Worksheet Name Jim A Excel Discussion (Misc queries) 2 March 26th 06 11:57 PM
Searching and Retrieving data from a Worksheet Larry Snyder Excel Worksheet Functions 1 March 1st 05 09:41 PM


All times are GMT +1. The time now is 04:34 AM.

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"