conditional formulas

  • Thread starter Thread starter jpj1
  • Start date Start date
J

jpj1

Hi

I need help an excel function/formula
Goal is to divide a number ex (40,50,60,75,87 etc) with specific constraints
say any number between 20 & 25 ex (65/(20>=&=<25))=3 to get a whole number
within that range.
 
Maybe something like this:

A1: (a number.....eg 60)
C2: (lower limit.......eg 20)
D2: (lower limit.......eg 25)

This ARRAY FORMULA, committed with CTRL+SHIFT+ENTER
(instead of just ENTER), returns the first integer quotient:

B1: =INDEX(A1/ROW(INDEX($A:$A,C2):INDEX($A:$A,D2)),
MATCH(1,--(MOD(A1/ROW(INDEX($A:$A,C2):INDEX($A:$A,D2)),1)=0),0))

In the above example, the formula divides 60 by 20, 21, 22, 23, 24 and 25
and returns the first quotient that is a whole number: 3

Is that something you can work with?

--
Regards,

Ron
Microsoft MVP (Excel)
(xl2003, XP Pro)
 
Darn! I never seem to notice typos until AFTER I send.

This:
D2: (lower limit.......eg 25)

Should be THIS:
D2: (upper limit.......eg 25)

--
Regards,

Ron
Microsoft MVP (Excel)
(xl2003, XP Pro)
 
Back
Top