#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If and Lookup

I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default If and Lookup

One guess, maybe something like this

Assuming col B to be tested vs values in col H
In C1: =IF(A1="","",IF(COUNTIF(H:H,B1),A1,"X"))
Copy down

Then to get the X's in red font
Select col C, apply CF using Formula Is:
=C1="X"
Format the font as red, ok out

Any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"bruster" wrote:
I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default If and Lookup

Try the below. Sheet2A:A contains the other table

Col A Col B Col C
1 One =IF(ISNA(MATCH(B2,Sheet2!A:A,0)),"",A2)
2 Two
3 Three
4 Four
5 Five

If this post helps click Yes
---------------
Jacob Skaria


"bruster" wrote:

I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default If and Lookup

Oops.. I missed the second part; and Conditional Formatting as mentioned by
Max..

=IF(ISNA(MATCH(B2,Sheet2!A:A,0)),"X",A2)


If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Try the below. Sheet2A:A contains the other table

Col A Col B Col C
1 One =IF(ISNA(MATCH(B2,Sheet2!A:A,0)),"",A2)
2 Two
3 Three
4 Four
5 Five

If this post helps click Yes
---------------
Jacob Skaria


"bruster" wrote:

I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If and Lookup

Your answer seems to test one column against another. Let me try my question
again. I want to test value in H4 to see if it matches any of the values in
Col B4...B19. If so, I want to return value of C4. If not, I want the red
"X".
--
Bruce Kollister


"Max" wrote:

One guess, maybe something like this

Assuming col B to be tested vs values in col H
In C1: =IF(A1="","",IF(COUNTIF(H:H,B1),A1,"X"))
Copy down

Then to get the X's in red font
Select col C, apply CF using Formula Is:
=C1="X"
Format the font as red, ok out

Any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"bruster" wrote:
I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default If and Lookup

=IF(ISNA(MATCH(H4,B4:B19,0)),"X",C4)

and conditional format the formula column.

If this post helps click Yes
---------------
Jacob Skaria


"bruster" wrote:

Your answer seems to test one column against another. Let me try my question
again. I want to test value in H4 to see if it matches any of the values in
Col B4...B19. If so, I want to return value of C4. If not, I want the red
"X".
--
Bruce Kollister


"Max" wrote:

One guess, maybe something like this

Assuming col B to be tested vs values in col H
In C1: =IF(A1="","",IF(COUNTIF(H:H,B1),A1,"X"))
Copy down

Then to get the X's in red font
Select col C, apply CF using Formula Is:
=C1="X"
Format the font as red, ok out

Any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"bruster" wrote:
I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If and Lookup

Outstanding, Jacob. Your first reply worked perfectly. I'm sorry I didn't
realize it right away. Can I possibly get your email address for future
reference. You are good. Thank you very much.
--
Bruce Kollister


"Jacob Skaria" wrote:

=IF(ISNA(MATCH(H4,B4:B19,0)),"X",C4)

and conditional format the formula column.

If this post helps click Yes
---------------
Jacob Skaria


"bruster" wrote:

Your answer seems to test one column against another. Let me try my question
again. I want to test value in H4 to see if it matches any of the values in
Col B4...B19. If so, I want to return value of C4. If not, I want the red
"X".
--
Bruce Kollister


"Max" wrote:

One guess, maybe something like this

Assuming col B to be tested vs values in col H
In C1: =IF(A1="","",IF(COUNTIF(H:H,B1),A1,"X"))
Copy down

Then to get the X's in red font
Select col C, apply CF using Formula Is:
=C1="X"
Format the font as red, ok out

Any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"bruster" wrote:
I want to return cell value A when cell value B is found in a range of cells
in a separate one column of values. If cell value A is not found in the
range I want a red capital "X" returned. I think this would involve an IF
function combined with some type of LOOKUP, but I'm not sure. Can someone
help?
--
Bruce Kollister

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 FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Lookup looks to the prior column if zero appears in the lookup col kenbquik Excel Discussion (Misc queries) 2 March 12th 09 03:41 AM
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
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 05:32 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"