+ Reply to Thread
Results 1 to 3 of 3

If Statement...Nesting Limit

  1. #1
    Registered User
    Join Date
    07-14-2011
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    28

    If Statement...Nesting Limit

    Running Excel 2007. I'm trying to use the following formula to sum up data.. =if(B7="Jan",sum(N7:T7),if(B7="Feb",sum(P7:W7),if(B7="Mar",sum(F7:M7).... etc. If I do this for all 12 months excel gives me the error that I reached the nesting limit. Does anyone know another formula that might work? If there is a VBA solution that would be good as well.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: If Statement...Nesting Limit

    Try expanding this regular formula...
    =SUM(CHOOSE(MONTH(B7&" 1"),N7:T7,P7:W7,F7:M7))
    or this one
    =IF(B7<>"",SUM(CHOOSE(MONTH(B7&" 1"),N7:T7,P7:W7,F7:M7)),"no month")

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-14-2011
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: If Statement...Nesting Limit

    The first statement worked splendidly...Thank you!

+ 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