Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Lookup Question Based upon 2 Variables

I have read the other posts similar to my question - but I still do not
understand. Please help.

My problem is I would like to lookup a code that is specific to a value to
determine if it exists in a table of data I have created. For example the
following table is named "DATA".

VALUE CODE
1111 505
1111 506
1111 507
1112 505
1112 609
1112 803

I have a value in cell F3 and a code in cell I3. I want to be able to
create a formula in cell M3 which will determine if I have a valid code for
the value. For instance I need to determine if code 505 is valid for Value
1111. Since it is I need a response of "Valid". On the other hand if I have
a code of 803 for value 1111 I need a response of "Invalid".

Thanks for your help!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default Lookup Question Based upon 2 Variables

Hi Lois,

Try this formula:

=IF(OR((A2:A10=I3)*(B2:B10=F3)),"Valid","Invalid")

Enter this as an array formula by pressing Shift+Ctrl+Enter instead of
Enter. Add absolute references if you intend to copy it down.
=IF(OR((A$1:A$4=I3)*(B$1:B$4=F3)),"Valid","Invalid ")
I put the table you display in A1:B10.

Cheers,
Shane Devenshire
Microsoft Excel MVP

"Lois" wrote in message
...
I have read the other posts similar to my question - but I still do not
understand. Please help.

My problem is I would like to lookup a code that is specific to a value to
determine if it exists in a table of data I have created. For example the
following table is named "DATA".

VALUE CODE
1111 505
1111 506
1111 507
1112 505
1112 609
1112 803

I have a value in cell F3 and a code in cell I3. I want to be able to
create a formula in cell M3 which will determine if I have a valid code
for
the value. For instance I need to determine if code 505 is valid for
Value
1111. Since it is I need a response of "Valid". On the other hand if I
have
a code of 803 for value 1111 I need a response of "Invalid".

Thanks for your help!!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Lookup Question Based upon 2 Variables

One possible way


=IF(SUMPRODUCT(--(A1:A10=I3),--(B1:B10=F3))0,"Valid","Invalid")

replace A1:A10 and B1:B10 with the 2 value and code ranges


--


Regards,


Peo Sjoblom



"Lois" wrote in message
...
I have read the other posts similar to my question - but I still do not
understand. Please help.

My problem is I would like to lookup a code that is specific to a value to
determine if it exists in a table of data I have created. For example the
following table is named "DATA".

VALUE CODE
1111 505
1111 506
1111 507
1112 505
1112 609
1112 803

I have a value in cell F3 and a code in cell I3. I want to be able to
create a formula in cell M3 which will determine if I have a valid code
for
the value. For instance I need to determine if code 505 is valid for
Value
1111. Since it is I need a response of "Valid". On the other hand if I
have
a code of 803 for value 1111 I need a response of "Invalid".

Thanks for your help!!



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 Question with multiple dynamic variables Robin Excel Worksheet Functions 14 June 12th 08 09:40 PM
Lookup function using 2 variables tbar38547 Excel Worksheet Functions 2 April 14th 07 03:54 PM
Lookup with Variables rlee1999 Excel Worksheet Functions 2 October 25th 06 10:01 PM
lookup 2 variables KarenF Excel Discussion (Misc queries) 1 August 28th 06 04:10 PM
can't figure out LOOKUP with 2 variables LTUser54 Excel Discussion (Misc queries) 1 May 30th 06 07:41 PM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"