+ Reply to Thread
Results 1 to 17 of 17

IF and AND too many arguments

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    jonesboro, ar
    MS-Off Ver
    Excel 2010
    Posts
    9

    IF and AND too many arguments

    I have this formula that works perfectly, but it exceeds the argument requirements. Can someone pleas help me out condensing this so I can use it

    IF(B7=1,"bucket 1",IF(B7>1+AND(B7<=90),"bucket 2"),IF(B7>90+AND(B7<=180),"bucket 3"),IF(B7>180+AND(B7<=360),"bucket 4"),IF(B7>360+AND(B7<=1800),"bucket 5","bucket 6"))

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    Andrea, this formula is incorrect, you do not have enough arguments in some if statements and too many in others. Could you explain what you are trying to do or post your workbook that you have this formula in so i can help you.
    Regards,
    amotto

    If I helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    try this

    =IF(B7=1,"bucket 1",IF(AND(B7>1,B7<=90),"bucket2",IF(AND(B7>90,B7<=180),"bucket 3",IF(AND(B7>180,B7<=360),"bucket 4",IF(AND(B7>360,B7<=1800),"bucket 5","bucket 6")))))

  4. #4
    Registered User
    Join Date
    09-26-2012
    Location
    jonesboro, ar
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: IF and AND too many arguments

    I am trying to input...... If for say, cell x = 1, i want it categorized into bucket 1, if cell x >1 and <=90 put into bucket 2, if cell x >90 and <= 180 put in bucket 3, cell x is >180 and <= 360 put into bucket 4, if cell x is >360 and <= 1800 put into bucket 5, and if cell x >1800 put in bucket 6

  5. #5
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    Does my last formula work for you?

  6. #6
    Registered User
    Join Date
    09-26-2012
    Location
    jonesboro, ar
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: IF and AND too many arguments

    Thank you so much this helped... I have another question if you could help me

  7. #7
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    sure, go ahead.

  8. #8
    Registered User
    Join Date
    09-26-2012
    Location
    jonesboro, ar
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: IF and AND too many arguments

    is there a way in excel to do this. if i input the number 20 in cell x, how do i get it to number down a column 1 to 20?

  9. #9
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    i am not too sure what you are trying to say here. I am sorry for my confusion.

  10. #10
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: IF and AND too many arguments

    Try this:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  11. #11
    Registered User
    Join Date
    09-26-2012
    Location
    jonesboro, ar
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: IF and AND too many arguments

    I am making an excel sheet for the Interest Risk Model, the Duration Model

  12. #12
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    I am sorry i do not know much about interest risk model, or duration modeling. could you please explain what you are trying to do. I understand that you want to put 20 in cell x with x being any cell. then where would you like to number from 1 to 20?

  13. #13
    Registered User
    Join Date
    09-26-2012
    Location
    jonesboro, ar
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: IF and AND too many arguments

    Like if I input 20 into cell A1, I want it to number B1-B20.

  14. #14
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    Okay, so if it said 10 it would number from B1-B10?

  15. #15
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    if that is the case, here is the code that you will need, you can put this into a macro by opening your Excel VBA (Alt+F11) inserting a macro and just copy this code in and run the macro. Of course you will need to put a number in A1 in order for the code to work.
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    Is that what you were needing?

  17. #17
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: IF and AND too many arguments

    Andrea, you will want to mark this thread as solved if i have answered all of your question. You can see how to do this in my signature.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1