View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Multiple If's and OR's

Try something like this:

With a sheet named: RefSheet
A1:C6 contains this list (Row_1 holds the col headings)

DB_Server AppServer Price
Red Blue 10
Green Orange 20
Purple Yellow 30
Brown Teal 40
Taupe Ecru 50

Then....on another sheet
A1: (a DB Server Name.....eg Green)
B1: (an App Server Name...eg Orange)

Then this formula returns the price for that combination:
C1:
=SUMPRODUCT((A1&B1=RefSheet!$A$2:$A$6&RefSheet!$B$ 2:$B$6)*RefSheet!$C$2:$C$6)

In the above example, the formula returns: 20

Note: There are other efficiencies to be gained by named ranges, if that
formula does what you want.

Is that something you can work with?

Post back with more questions.

***********
Regards,
Ron

XL2002, WinXP


"Shelly" wrote:

Thanks everyone for your responses... let me clarify a few things. I was
wrong in listing my cells. They should be:

If A1 = "red" and if B1 = "blue" enter 10 in C1, or
If A1 = "green" and if B1 = "orange" enter 20 in C1, or
If A1 = "purple" and if B1 = "yellow" enter 30 in C1.

If no conditions apply, C1 can be left blank.

You are correct that the data given here is not the real data... just
placeholders. Don't know if the actual data will help, but here's a
description:

In a reference shet, I have two columns and 5 rows, with 5 combinations of
computer types - a database server in the first column, and an application
server in the 2nd column. I need to assign pricing to these combinations.
The selections the user will enter will always be in the pairs as they are
listed in the columns/rows (row1 column1 and row 1 column 2 will always be
paired, row 2 and column 1 and row 2 and column 2 will always be paried, etc).

I am using these lists of hardware in other places, so I need to keep them
in 2 columns - not combine the selections in one cell.

When a combination is picked (by using names and data validation), I need to
insert a price in the open cell (C1).

I'm going to try some of the options above and see if they work.

Thanks!