Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default How to look up 2 Cell Values

I wish to lookup 2 cells and if they = a certain value then set number in
another cell...
eg:

if
b2 = a4 and d2 = 1 then cell x2 = 10
b3 = a4 and d3 = 4 then cell x3 = 8
b4 = a3 and d4 = 4 then cell x4 = 8

and so on...


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default How to look up 2 Cell Values

For your first relationship, you would put this in X2...

=IF(AND(B2=A4,D2=1),10,"")

Follow the same construction layout for your other relationships.

Note, since you didn't say what you wanted if the test failed, I outputted
the empty string ("")... you can change that as needed.

--
Rick (MVP - Excel)


"PR" wrote in message
...
I wish to lookup 2 cells and if they = a certain value then set number in
another cell...
eg:

if
b2 = a4 and d2 = 1 then cell x2 = 10
b3 = a4 and d3 = 4 then cell x3 = 8
b4 = a3 and d4 = 4 then cell x4 = 8

and so on...


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default How to look up 2 Cell Values

I would like also to check the same cell if it is =

if
b2 = a4 and d2 = 1 then cell x2 = 10
OR
b2 = a4 and d3 = 4 then cell x3 = 8
OR
b2 = a3 and d4 = 4 then cell x4 = 8
else 0



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default How to look up 2 Cell Values

Then (using the 2nd relationship as an example) I don't understand your
specifying the "then cell x3 = 8" part... if that doesn't mean Cell X3, what
does it mean? Just so we are clear about how Excel works, you can't have a
formula in one cell "push" out a value into another cell... cells can only
"pull" values in... so each cell that you want to display a value in has to
have its own formula.

--
Rick (MVP - Excel)


"PR" wrote in message
...
I would like also to check the same cell if it is =

if
b2 = a4 and d2 = 1 then cell x2 = 10
OR
b2 = a4 and d3 = 4 then cell x3 = 8
OR
b2 = a3 and d4 = 4 then cell x4 = 8
else 0




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default How to look up 2 Cell Values

X3 is the cell that I am putting the forumla in... does this make sense?

Paul




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default How to look up 2 Cell Values

Then I stand by my first posting. Put this in X2...

=IF(AND(B2=A4,D2=1),10,"")

and using the same formula construction, put this in X3...

=IF(AND(B2=A4,D3=4),8,"")

and continue constructing the formulas you put in your other cells in the
same way.

--
Rick (MVP - Excel)


"PR" wrote in message
...
X3 is the cell that I am putting the forumla in... does this make sense?

Paul


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 257
Default How to look up 2 Cell Values

I guess you want the IF and AND functions, then. The AND function takes two
or more conditions and returns TRUE if they're all TRUE, FALSE otherwise.
Like this:

=AND(B2=A4,D2=1)

That returns either TRUE or FALSE. Now, before you combine it with the IF
function you need to fill in a blank you didn't mention befo What do you
want X2 to be equal to if the above is NOT true?

--- "PR" wrote:
I wish to lookup 2 cells and if they = a certain value then set number in
another cell...
eg:

if
b2 = a4 and d2 = 1 then cell x2 = 10
b3 = a4 and d3 = 4 then cell x3 = 8
b4 = a3 and d4 = 4 then cell x4 = 8

and so on.

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
VLookup multiple values - sum returned values into single cell se7098 Excel Worksheet Functions 12 April 2nd 23 07:32 PM
Copy values from a cell based on values of another cell Spence10169 Excel Discussion (Misc queries) 4 January 13th 09 10:01 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
Replacing Linked Cell Values w/ Current Values TomCat Excel Worksheet Functions 6 April 10th 06 12:20 PM


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