+ Reply to Thread
Results 1 to 5 of 5

IF Statement - "You've entered too many arguments for this function" - Or an alternative!

  1. #1
    Registered User
    Join Date
    03-28-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    24

    IF Statement - "You've entered too many arguments for this function" - Or an alternative!

    Hello! I'm trying to pull an average for specific time frames throughout the day using a dropdown menu for each day of the week - but the kicker is that each day is located on a separate tab in a workbook. I've tried the code below, and it works beautifully until I try to add more days worth of to it. I keep getting a "You've entered too many arguments for this function" error when adding Wednesday to the mix.

    Can anyone point out my error? If not, perhaps a more elegant and less time intensive way of making this happen.

    B2 - Dropdown
    H5 - First hour of the day

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: IF Statement - "You've entered too many arguments for this function" - Or an alternati

    The if function only has one format

    = IF( "The Logical Statement", "Result if True", "Result If False")

    Try
    =IF($B$2="Monday",AVERAGE('0807'!H5,'0814'!H5,'0821'!H5,'0828'!H5,'0904'!H5,'0911'!H5,'0918'!H5,'0925'!H5,'1009'!H5,'1016'!H5,'1023'!H5,'1030'!H5,'1106'!H5,'1113'!H5,'1218'!H5,'0108'!H5,'0115'!H5,'0122'!H5,'0205'!H5,'0219'!H5,'0226'!H5,'0305'!H5,'0312'!H5),IF($B$2="Tuesday",AVERAGE('0808'!H5,'0815'!H5,'0822'!H5,'0829'!H5,'0905'!H5,'0912'!H5,'0919'!H5,'0926'!H5,'1010'!H5,'1017'!H5,'1024'!H5,'1031'!H5,'1107'!H5,'1114'!H5,'1219'!H5,'0109'!H5,'0116'!H5,'0123'!H5,'0206'!H5,'0220'!H5,'0227'!H5,'0306'!H5,'0313'!H5),""))
    Last edited by mehmetcik; 03-28-2018 at 03:47 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: IF Statement - "You've entered too many arguments for this function" - Or an alternati

    it looks to me like you've ended your if statement then attached a second one
    =IF($B$2="Monday",(AVERAGE('0807'!H5,'0814'!H5,'0821'!H5,'0828'!H5,'0904'!H5,'0911'!H5,'0918'!H5,'0925'!H5,'1009'!H5,'1016'!H5,'1023'!H5,'1030'!H5,'1106'!H5,'1113'!H5,'1218'!H5,'0108'!H5,'0115'!H5,'0122'!H5,'0205'!H5,'0219'!H5,'0226'!H5,'0305'!H5,'0312'!H5,)),IF($B$2="Tuesday",(AVERAGE('0808'!H5,'0815'!H5,'0822'!H5,'0829'!H5,'0905'!H5,'0912'!H5,'0919'!H5,'0926'!H5,'1010'!H5,'1017'!H5,'1024'!H5,'1031'!H5,'1107'!H5,'1114'!H5,'1219'!H5,'0109'!H5,'0116'!H5,'0123'!H5,'0206'!H5,'0220'!H5,'0227'!H5,'0306'!H5,'0313'!H5,))))
    If you are going that direction I would get rid of those highlighted in bold red and try it again.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    03-28-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    24

    Re: IF Statement - "You've entered too many arguments for this function" - Or an alternati

    Thank you gentlemen, you're both awesome.
    Seems I was making things more complicated that I needed to.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: IF Statement - "You've entered too many arguments for this function" - Or an alternati

    you're welcome and thank you for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Nested IF function error "You've entered too many arguments..."
    By lhendrickson in forum Excel General
    Replies: 15
    Last Post: 11-19-2018, 09:53 AM
  2. [SOLVED] "You've entered too many arguments for this function" error
    By Canadian911Guy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-07-2018, 10:27 AM
  3. "You've entered too many arguments for this function"
    By twyckoff in forum Excel General
    Replies: 3
    Last Post: 11-11-2014, 01:12 PM
  4. Nested IF function error "You've entered too many arguments..."
    By lovetofly32 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-14-2014, 08:33 PM
  5. [SOLVED] Help with "You've entered too many arguments for this function" multiple INDEX(MATCH
    By BeachRock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2013, 06:10 PM
  6. Replies: 6
    Last Post: 05-18-2012, 08:20 AM
  7. Replies: 4
    Last Post: 05-29-2005, 09:05 PM

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