PDA

View Full Version : Excel: 2 criteria - 1 answer


Srecak
May 8, 2006, 12:06 AM
GMorning Ladies/Gentlemen!

Here's a small question:
Is it possible to have two criteria which are filled in by a user, and in a third box an answer appears? I have put an example attached in zip format.

Many thanks,
Srecak

RickJ
May 8, 2006, 02:56 AM
Yes, it is possible. I friend made one for me, attached. I'm sorry to say that I don't know how he did it, but if no one posts exact instructions here, you can look at the cells and see how it works.

ScottGem
May 8, 2006, 06:09 AM
The sheet Rick attached basically use formuals to make the clacs.

The way Excel works, if you can create calculations that use entries in other cells, just by referencing the cell location: I.E. = A1+B1
Put that formula in C1 and it will display the sum of A1 and B1.

If you need a further explanation plese post more details.

Srecak
May 8, 2006, 06:21 AM
Sorry Guys, but that's not quiet what I want... not calculations but retrieval, based on two criteria... weight (between 0.5 - 3.0 kg) and zone (1 to 8). The centre parts top line shows the basis price and each different weight an additional cost to this 1st price.
So if in criteria 1, I put 3.7kg and criteria 2, I put 4 as a zone, I should get a retrieval value/price of: 3.7kg goes under 3.0-5.0kg and zone 4 is 10.00 euros, plus the basic price for zone 4 being 55.00 euros adds up to 65.00 euros!
Hope this makes it easier to understand?

Srecak

RickJ
May 8, 2006, 06:25 AM
Sorry. Yes, I did misunderstand. Hang tight, there are several Excel gurus hanging out here. ;)

ScottGem
May 8, 2006, 06:44 AM
Look up Microsoft Query in Excel Help. You can use that to perform such queries.

LTheobald
May 8, 2006, 07:05 AM
VLookup (http://www.techonthenet.com/excel/formulas/vlookup.php) & HLookup (http://www.techonthenet.com/excel/formulas/hlookup.php) might be handy here. If you don't have an example when I get home - I'll write one for you.

Srecak
May 16, 2006, 10:05 AM
LTheobald,
Sorry for the late reply!
An example would be great!

Many thanks
Srecak

cajalat
May 16, 2006, 04:28 PM
I couldn't figure out how to do it using HLOOKUP and VLOOKUP (doesn't mean it can't be done) but I came up with a different way using the functions INDEX and COUNTIF. I did have to make a modification to the range where you lookup the values as I don't believe EXEL has a way of interpreting the values in the cells (at least not easily). I basically broke the values into two columns. Your table also lists ranges with gaps in them. i.e. 2.6kg doesn't exactly fall between 0.5-2.5 or 3.0-5.0 so I broke out that range and made the assumption that if the value is less <3.0 but greater than 0.5 then it is assumed that it is in the range of 0.5-2.5 so anything less than 3.0 kg but greater or equal to 0.5 will get the rate of 0.5-2.5. Confusing but take a look at the attached.

Casey

Srecak
May 18, 2006, 12:20 AM
Cajalat!

You have saved my bacon! This works brilliantly!
Many thanks,
Srecak