Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Karaman
 
Posts: n/a
Default Search for a number in a table and return data of a specific cell

This is the setup:
Table 1
Column 1 Column 2
Date1 Date1
Date2 Date2
A C
E B

Table 2
String1 Column A Column B
E

Task: For cell in Table 2 column A, find if "E" is present in Column 1 of
Table 1, then read Date 1 into the cell, otherwise leave blank. Thank you
and I hope that you can help me with this one.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Nikki
 
Posts: n/a
Default Search for a number in a table and return data of a specific cell

try this:

=IF(ISERROR(MATCH(C18,$A:$A,0)0),"",A$2)

A2 where the date is, assuming its location does not change
C18 where E is

if it doesn't work give me more detail.

Thanks-
"Karaman" wrote:

This is the setup:
Table 1
Column 1 Column 2
Date1 Date1
Date2 Date2
A C
E B

Table 2
String1 Column A Column B
E

Task: For cell in Table 2 column A, find if "E" is present in Column 1 of
Table 1, then read Date 1 into the cell, otherwise leave blank. Thank you
and I hope that you can help me with this one.

  #3   Report Post  
Posted to microsoft.public.excel.misc
JLatham
 
Posts: n/a
Default Search for a number in a table and return data of a specific cell

I presume we can ignore the stuff under Column 2 in Table 1 completely?

This is set up for all being on a single sheet, but would adapt easily to
multiple sheet as I presume you're dealing with multiple sheets. It is very
dependent on the layout of your data in the tables, since it's not conducive
as is for either a VLOOKUP or HLOOKUP.
A
1 Date1
2 Date2
3 A
4 E

down in A13 I put the "E" and in B13 I put this formula:
=IF(ISNA(MATCH(A13,A1:A4,0)),"",OFFSET(A1,ROW(A4)-MATCH(A13,A1:A4),0))

This is dependent on the "E" being looked for always being at the bottom of
the table (A4 in this case) and the data being desired for return to be at
the top of it.

Nikki has provided another possible solution. But for both of our
solutions, the layout (relative position of data) of the table is kind of
critical. In point of fact if you are always going to look at stuff in row 4
and pick up stuff from row 1 you could do a very simple
=IF(A13=A4,A1,"")
again, in my example, I put the stand-alone E down in A13.


"Karaman" wrote:

This is the setup:
Table 1
Column 1 Column 2
Date1 Date1
Date2 Date2
A C
E B

Table 2
String1 Column A Column B
E

Task: For cell in Table 2 column A, find if "E" is present in Column 1 of
Table 1, then read Date 1 into the cell, otherwise leave blank. Thank you
and I hope that you can help me with this one.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Karaman
 
Posts: n/a
Default Search for a number in a table and return data of a specific c

Thank you very much for the assistance.

"JLatham" wrote:

I presume we can ignore the stuff under Column 2 in Table 1 completely?

This is set up for all being on a single sheet, but would adapt easily to
multiple sheet as I presume you're dealing with multiple sheets. It is very
dependent on the layout of your data in the tables, since it's not conducive
as is for either a VLOOKUP or HLOOKUP.
A
1 Date1
2 Date2
3 A
4 E

down in A13 I put the "E" and in B13 I put this formula:
=IF(ISNA(MATCH(A13,A1:A4,0)),"",OFFSET(A1,ROW(A4)-MATCH(A13,A1:A4),0))

This is dependent on the "E" being looked for always being at the bottom of
the table (A4 in this case) and the data being desired for return to be at
the top of it.

Nikki has provided another possible solution. But for both of our
solutions, the layout (relative position of data) of the table is kind of
critical. In point of fact if you are always going to look at stuff in row 4
and pick up stuff from row 1 you could do a very simple
=IF(A13=A4,A1,"")
again, in my example, I put the stand-alone E down in A13.


"Karaman" wrote:

This is the setup:
Table 1
Column 1 Column 2
Date1 Date1
Date2 Date2
A C
E B

Table 2
String1 Column A Column B
E

Task: For cell in Table 2 column A, find if "E" is present in Column 1 of
Table 1, then read Date 1 into the cell, otherwise leave blank. Thank you
and I hope that you can help me with this one.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Karaman
 
Posts: n/a
Default Search for a number in a table and return data of a specific c

Thank you very much for the assistance.

"Nikki" wrote:

try this:

=IF(ISERROR(MATCH(C18,$A:$A,0)0),"",A$2)

A2 where the date is, assuming its location does not change
C18 where E is

if it doesn't work give me more detail.

Thanks-
"Karaman" wrote:

This is the setup:
Table 1
Column 1 Column 2
Date1 Date1
Date2 Date2
A C
E B

Table 2
String1 Column A Column B
E

Task: For cell in Table 2 column A, find if "E" is present in Column 1 of
Table 1, then read Date 1 into the cell, otherwise leave blank. Thank you
and I hope that you can help me with this one.

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 Data in two seperate Spreadsheets Padraig Excel Worksheet Functions 6 June 28th 06 03:05 PM
VLOOKUP CONDITION TO RETURN BLANK CELL WHERE LOOKUP VALUE IS NOT IN TABLE ARRAY Scott Lolmaugh Excel Worksheet Functions 3 March 9th 06 11:05 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Input cell reference is not valid (One Variable Data Table) Dottore Excel Worksheet Functions 9 September 1st 05 03:05 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


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