Specific value for two variables

# Specific value for two variables

• Tuesday, March 06, 2012 10:36 PM

Hi,

I'm trying to have a cell return a specific value for a limited number of variable combinations.

If cell1 = 3 and cell2 = 32, I want cell3 to return 50,000.

If cell1 = 1 and cell2 = 16, I want cell3 to return 75,000.

So Cell1 will have a range or 1 through 3 and Cell 2 will either be 16, 32, or 64. Each combination will have a specific value in Cell3 that is completely unrelated to the numerical values.

Does that make sense? Basically I'm trying to calculate other values in a spread sheet that depend on a rule of thumb estimation (cell3) of how much data (cell1) can be processed by a certain amount of RAM (cell2).

Glenn

### All Replies

• Tuesday, March 06, 2012 10:49 PM

I would simply use a lookup

set up an area with 2 columns:

col1      Col2

332      50,000

116      75,000

essentially, column 1 is a concatenation of the possible values in cell1 & cell2

col2 is the value you want to return

Name the range as you want (e.g. sr_Lkup)

then your formula is = vlookup(A1&B1,sr_Lkup,2,false)

Rgds Geoff
----------------------------------------------------------

• Tuesday, March 06, 2012 10:49 PM

I'd create a lookup table and use a combination of INDEX and MATCH:

Regards, Hans Vogelaar

• Marked As Answer by Wednesday, March 07, 2012 6:56 PM
•
• Tuesday, March 06, 2012 10:53 PM
Moderator

With cell1 bein g A1 and cell2 being A2, something like

=100*A1 + A2

gsnu201202

• Wednesday, March 07, 2012 6:57 PM

Thank you Hans,

That did the trick nicely. You are entitled to a steak dinner on your next visit to San Diego. :-)

Glenn

• Wednesday, March 07, 2012 8:19 PM

You are entitled to a steak dinner on your next visit to San Diego. :-)

Thank you!

Regards, Hans Vogelaar