Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Can you lookup a value & get the cell reference?

I have a workbook with two sheets. I am trying to look up a value in cell A1
of Sheet 1 in colum A through C of Sheet 2. When it finds the value, I want
it to return a reference to the cell where it was found (or somehow tell me
where it was found).

I could reduce my search to just column A of Sheet 2, but I would prefer not
to since there are some cases were the value is in column C. I have not been
able to find a lookup function that returns a reference. Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Can you lookup a value & get the cell reference?

Assuming result is in either column A or C:

=IF(ISNA("A"&MATCH(A1,Sheet2!$A$1:$A$10,0)),IF(ISN A("A"&MATCH(A1,Sheet2!$C$1:$C$10,0)),"","C"&MATCH( A1,Sheet2!$C$1:$C$10,0)),"A"&MATCH(A1,Sheet2!$A$1: $A$10,0))

HTH

"S. Bevins" wrote:

I have a workbook with two sheets. I am trying to look up a value in cell A1
of Sheet 1 in colum A through C of Sheet 2. When it finds the value, I want
it to return a reference to the cell where it was found (or somehow tell me
where it was found).

I could reduce my search to just column A of Sheet 2, but I would prefer not
to since there are some cases were the value is in column C. I have not been
able to find a lookup function that returns a reference. Is this possible?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Can you lookup a value & get the cell reference?

Thank you. This does work for column A since the values in both sheets are
the same. Unfortunately, the value I am looking for is text and the text may
be anywhere in the text strings in column C so it does not work for column C,
but it is better than what I had. Thanks again.

"Toppers" wrote:

Assuming result is in either column A or C:

=IF(ISNA("A"&MATCH(A1,Sheet2!$A$1:$A$10,0)),IF(ISN A("A"&MATCH(A1,Sheet2!$C$1:$C$10,0)),"","C"&MATCH( A1,Sheet2!$C$1:$C$10,0)),"A"&MATCH(A1,Sheet2!$A$1: $A$10,0))

HTH

"S. Bevins" wrote:

I have a workbook with two sheets. I am trying to look up a value in cell A1
of Sheet 1 in colum A through C of Sheet 2. When it finds the value, I want
it to return a reference to the cell where it was found (or somehow tell me
where it was found).

I could reduce my search to just column A of Sheet 2, but I would prefer not
to since there are some cases were the value is in column C. I have not been
able to find a lookup function that returns a reference. Is this possible?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Can you lookup a value & get the cell reference?

Try:

=IF(ISNA("A"&MATCH(A1,Sheet2!$A$1:$A$10,0)),IF(ISN A("C"&MATCH("*" & A1 &
"*",Sheet2!$C$1:$C$10,0)),"","C"&MATCH("*" & A1 &
"*",Sheet2!$C$1:$C$10,0)),"A"&MATCH(A1,Sheet2!$A$1 :$A$10,0))

You could change both searches to be "wildcard" rather thn just the column C

HTH

"S. Bevins" wrote:

Thank you. This does work for column A since the values in both sheets are
the same. Unfortunately, the value I am looking for is text and the text may
be anywhere in the text strings in column C so it does not work for column C,
but it is better than what I had. Thanks again.

"Toppers" wrote:

Assuming result is in either column A or C:

=IF(ISNA("A"&MATCH(A1,Sheet2!$A$1:$A$10,0)),IF(ISN A("A"&MATCH(A1,Sheet2!$C$1:$C$10,0)),"","C"&MATCH( A1,Sheet2!$C$1:$C$10,0)),"A"&MATCH(A1,Sheet2!$A$1: $A$10,0))

HTH

"S. Bevins" wrote:

I have a workbook with two sheets. I am trying to look up a value in cell A1
of Sheet 1 in colum A through C of Sheet 2. When it finds the value, I want
it to return a reference to the cell where it was found (or somehow tell me
where it was found).

I could reduce my search to just column A of Sheet 2, but I would prefer not
to since there are some cases were the value is in column C. I have not been
able to find a lookup function that returns a reference. Is this possible?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Can you lookup a value & get the cell reference?

So close ...
Now it is finding text that is part of other words (e.g., HE in chemistry).
I tried to do a "whole word search" by including spaces around the *, but
some of the text that I want to find is separated by only a - or / from other
text. I think that a case-sensitive search would resolve my dilemma. I tried
the FIND function, but that only seems to work if you are searching for text
in one cell, not a column.

Can perfection be achieved?

"Toppers" wrote:

Try:

=IF(ISNA("A"&MATCH(A1,Sheet2!$A$1:$A$10,0)),IF(ISN A("C"&MATCH("*" & A1 &
"*",Sheet2!$C$1:$C$10,0)),"","C"&MATCH("*" & A1 &
"*",Sheet2!$C$1:$C$10,0)),"A"&MATCH(A1,Sheet2!$A$1 :$A$10,0))

You could change both searches to be "wildcard" rather thn just the column C

HTH

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
Lookup a value and return its cell reference instead of the value LBenslay Excel Discussion (Misc queries) 1 July 19th 06 06:20 PM
Reference Cell Color From Other WorkSheets carCiNogn Excel Worksheet Functions 1 May 17th 06 09:35 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Input cell reference is not valid (One Variable Data Table) Dottore Excel Worksheet Functions 9 September 1st 05 03:05 PM
Return cell reference of lookup value bobm Excel Worksheet Functions 3 July 7th 05 08:49 AM


All times are GMT +1. The time now is 12:16 PM.

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"