View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pdberger
 
Posts: n/a
Default Use of range in an if function

Help --

Try something like:

=IF(N5<3,0,IF(N5<9,1,IF(N5<16,2,IF(N5<22,3,"Too Long!"))))

The other smarter guys around here will have more elegant ways to do this,
but it should work just fine.

HTH

"helpmeplease" wrote:

I have a nubmer of days that needs to fall into a certain week number for
pricing calculations. If the number of days is 3:8 then it is 1 week; 9:15
is 2 weeks; and 16:21 is 3 weeks. Right now the function is able to
correctly calculate week 1 and week 2. If I try to insert the week 3
function, I get an error that there are too many arguments. "N5" is the cell
with the number of days. I'm not very advanced with excel (it took me all
morning to get this far), so I would appreciate any help. Thanks!!

=IF(N5<9,IF(N52,1,0),IF(N5<16,IF(N58,2,0),0))