#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Going beyond just 30

Earlier I had asked the question about how to get an answer if a number was
put into E14 for units ordered and based on how many units they purchased,
F14 indicates 1-9 units, G14 indicates 10-19 units and H14 indicates 20-30
units. The formula that was given to me was
=if(E14=0,''',choose(int(E14/10)+1,F14,G14,H14,h14)). This works just fine
if I have up to 39. If I want to put in 44 or 66 or 120...I get a value
error. What can I do to make it so if I put 100,000 I do not get the error?
Thanks for anyone that can help me. Pete Elbert
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Going beyond just 30

One alternative using HLOOKUP:
=IF(E14=0,"",HLOOKUP(E14,{0,10,20,30.00001;"1-9","10-19","20-30","30"},2))

Above will return "30" for inputs in E14 exceeding 30.
Adapt to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Pete Elbert" wrote:
Earlier I had asked the question about how to get an answer if a number was
put into E14 for units ordered and based on how many units they purchased,
F14 indicates 1-9 units, G14 indicates 10-19 units and H14 indicates 20-30
units. The formula that was given to me was
=if(E14=0,''',choose(int(E14/10)+1,F14,G14,H14,h14)). This works just fine
if I have up to 39. If I want to put in 44 or 66 or 120...I get a value
error. What can I do to make it so if I put 100,000 I do not get the error?
Thanks for anyone that can help me. Pete Elbert

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"