Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Lookup function

Here's my problem. I have an excel workbook with 2 worksheets in it. The
first has a list of numbers in column A. The 2nd worksheet has another
list of numbers in column B of that worksheet and I need to make a
formula that for each number in worksheet 1, it will search the numbers
in worksheet 2 and tell me where the second occurance of the number
appears. The situation is that I know that the number is in worksheet 2
at least one time, but I need to find the second occurance of the number
if it exists. Can anyone help?? Thanks

DLS

Example: Worksheet 1 Worksheet 2
1 1
2 3
3 8
4 1
5 5
I need to know the position and existance of the second number 1.

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 733
Default Lookup function

<DLS wrote...
....
Example: Worksheet 1 Worksheet 2
1 1
2 3
3 8
4 1
5 5
I need to know the position and existance of the second number 1.


If the worksheet 1 range started in cell A1, then the row index of the 2nd
instance of Worksheet1!A1 in Worksheet2!B:B (which I'll name WS2B) would be
given by

C1:
=IF(COUNTIF(WS2B,A1)1,
MATCH(A1,OFFSET(WS2B,MATCH(A1,WS2B,0),0),0)+MATCH( A1,WS2B,0),
"no second instance")

Fill down as needed.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Lookup function

Finally got it working. Problem was pilot error here. Thanks a million
for the help. Your formula does the job.

DLS

*** Sent via Developersdex http://www.developersdex.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
Combining Lookup function and Sum function Cameron Excel Worksheet Functions 2 July 13th 09 02:19 AM
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
how to combine an IF Function with a lookup function to determine [email protected] Excel Worksheet Functions 1 December 5th 06 06:09 AM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


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