Thread: if questions
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default if questions

No IFs are needed. We will use VLOOKUP. In A1 thru B14, enter:

2 2
9 3
16 5
26 8
51 13
91 20
151 32
281 50
501 80
1201 125
3201 200
10001 315
35001 500
150001 800

In E1 enter the value to be looked up and in F1 enter:

=IF(E1500000,1250,VLOOKUP(E1,A1:B14,2,TRUE))

--
Gary''s Student - gsnu200805


"Mauro" wrote:

Hello, i want to compare a cell between two number and return the sample
quantity. I tried to do this using the IF and & functions, but it dosent
works beacuse i put more than 7 if.
The table that i want to use is the following
batch qty sample
2 8 2
9 15 3
16 25 5
26 50 8
51 90 13
91 150 20
151 280 32
281 500 50
501 1200 80
1201 3200 125
3201 10000 200
10001 35000 315
35001 150000 500
150001 500000 800
500001 more than 1250
IN other words, the function has to compare the value that i enter and
compare with the batch qty range and return the sample qty, for example: If
my current batch qty is 1220, the function has to return as sample qty 125
Thanks in advance
Mauro