Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default if statement - help needed

I am trying to write an if statement that will return:

If N2 is

between 1 and 30 insert 30 into L2
between 31 and 60 insert 60 into L2
between 61 and 90 insert 90 into L2
between 91 and 120 insert 120 into L2
if greater then 121 then insert 120+ into L2

Can someone help me with the if statement for the above.

Thanks a million!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default if statement - help needed

=MIN((INT((A1-1)/30)+1)*30,120)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Belinda7237" wrote in message
...
I am trying to write an if statement that will return:

If N2 is

between 1 and 30 insert 30 into L2
between 31 and 60 insert 60 into L2
between 61 and 90 insert 90 into L2
between 91 and 120 insert 120 into L2
if greater then 121 then insert 120+ into L2

Can someone help me with the if statement for the above.

Thanks a million!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default if statement - help needed

thanks, i realize i have my criteria wrong:

1-29 = 0
30-59 = 30
60-89 = 60
and 90 plus = 90

so the 120 at the end of the formula i can update to 90 - but how would i
change the other?

thanks again for your patience!

"Bob Phillips" wrote:

=MIN((INT((A1-1)/30)+1)*30,120)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Belinda7237" wrote in message
...
I am trying to write an if statement that will return:

If N2 is

between 1 and 30 insert 30 into L2
between 31 and 60 insert 60 into L2
between 61 and 90 insert 90 into L2
between 91 and 120 insert 120 into L2
if greater then 121 then insert 120+ into L2

Can someone help me with the if statement for the above.

Thanks a million!




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default if statement - help needed

=IF((AND((N21),(N2<30))),30,IF((AND((N231),(N2<6 0))),60,IF((AND((N261),(N2<90))),90,IF((AND((N29 1),(N2<120))),120,IF((N2121),"120+","INVALID")))) )

"Belinda7237" wrote:

I am trying to write an if statement that will return:

If N2 is

between 1 and 30 insert 30 into L2
between 31 and 60 insert 60 into L2
between 61 and 90 insert 90 into L2
between 91 and 120 insert 120 into L2
if greater then 121 then insert 120+ into L2

Can someone help me with the if statement for the above.

Thanks a million!



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
If statement ... help needed. parsonsamie Excel Worksheet Functions 3 December 14th 06 12:43 AM
Help with IF statement needed Paul B. Excel Worksheet Functions 5 August 28th 06 05:19 PM
If Statement - Help Needed Portuga Excel Discussion (Misc queries) 4 January 24th 06 04:26 PM
IF STATEMENT HELP NEEDED!!! Excel Dummy Excel Discussion (Misc queries) 2 December 30th 05 07:02 PM
If statement help needed Ian Harris Excel Worksheet Functions 2 December 3rd 04 11:36 AM


All times are GMT +1. The time now is 05:22 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"