![]() |
conditional formulas
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. |
conditional formulas
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) "jpj1" wrote in message ... 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. |
conditional formulas
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) "Ron Coderre" wrote in message ... 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) "jpj1" wrote in message ... 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. |
All times are GMT +1. The time now is 02:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com