Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
helpmeplease
 
Posts: n/a
Default Use of range in an if function

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))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default Use of range in an if function

Maybe this..........

=IF(N52,LOOKUP(N5,{3,9,16,22},{1,2,3,"Exceeds limit"}),"")

Vaya con Dios,
Chuck, CABGx3



"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))

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

Try this...

=IF(N1=3, IF(N19, IF(N115, IF(N121, 0, 3), 2), 1), 0)

I must say though that nesting that many IFs is a bit messy. Why not try
using a look-up table of some description?

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))

  #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))

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

Try this:

=LOOKUP(N5,{0,3,9,16;0,1,2,3})

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"helpmeplease" wrote in message
...
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))




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


pdberger,

Try this,

=IF(N5=16,3,IF(N5=9,2,IF(N5=3,1,0)))


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=556526

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

Or...........

=LOOKUP(N5,{0,3,9,16,22},{"",1,2,3,"Exceeds limit"})

Vaya con Dios,
Chuck, CABGx3



"CLR" wrote:

Maybe this..........

=IF(N52,LOOKUP(N5,{3,9,16,22},{1,2,3,"Exceeds limit"}),"")

Vaya con Dios,
Chuck, CABGx3



"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))

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

Thanks a bunch. I knew that my way was a messy way, but as I said I don't
know that much about excel. It works now, though. Thanks.

"CLR" wrote:

Maybe this..........

=IF(N52,LOOKUP(N5,{3,9,16,22},{1,2,3,"Exceeds limit"}),"")

Vaya con Dios,
Chuck, CABGx3



"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))

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

Happy to help.............thanks for the feedback.

Vaya con Dios,
Chuck, CABGx3



"helpmeplease" wrote:

Thanks a bunch. I knew that my way was a messy way, but as I said I don't
know that much about excel. It works now, though. Thanks.

"CLR" wrote:

Maybe this..........

=IF(N52,LOOKUP(N5,{3,9,16,22},{1,2,3,"Exceeds limit"}),"")

Vaya con Dios,
Chuck, CABGx3



"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))

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dana DeLouis
 
Posts: n/a
Default Use of range in an if function

Just to be different. Doesn't have error checking though.

=--(N5=3)+(N5=9)+(N5=16)

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"helpmeplease" wrote in message
...
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))



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Value of cell to determine range in MAX Function [email protected] Excel Worksheet Functions 8 February 18th 06 06:34 PM
use address function to indicate range in calculation Mayo Excel Worksheet Functions 3 February 6th 06 06:41 PM
ExceL Options: Add a chart for Box-plot type and Range function sebafishman Excel Discussion (Misc queries) 1 December 21st 05 08:37 PM
Number range function Sonya T Excel Discussion (Misc queries) 2 July 19th 05 01:19 AM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM


All times are GMT +1. The time now is 07:13 PM.

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

About Us

"It's about Microsoft Excel"