I need a second eye to review my formula. I keep getting "You've entered too many arguments for this function. I don't see it.

MsTima253 25 Reputation points
2023-06-25T22:27:28.4033333+00:00

=IF(OR(is_header, is_empty),"",

IF(is_total,

IF(selected_period="Total Year",

SUM(tracking[Amount] * (tracking[Type]=type) * (YEAR(tracking[Effective Date])=selected_year) ),

SUM(tracking[Amount] * (tracking[Type]=type) * (YEAR(tracking[Effective Date])=selected_year) * (Month(tracking[Effective Date]=selected_period))),

if(selected_period="Total Year",

"cat & total year",

"cat & spec. month")))

Microsoft 365 and Office | Excel | For business | Windows
{count} vote

Accepted answer
  1. MOUSSA EL HAJRAOUI 315 Reputation points
    2023-06-26T00:51:56.0066667+00:00

    HiHiYou can start by putting long expressions in variables, eg.

    SUM(

    tracking[Amount] * (tracking[Type]=type) * (YEAR(tracking[Effective Date])=selected_year)

    )

    AND

    SUM(

    tracking[Amount] * (tracking[Type]=type) * (YEAR(tracking[Effective Date])=selected_year) * (Month(tracking[Effective Date]=selected_period))

    )

    The rest will be easy.

    Can you upload the sheet without data or fake data? It will be easy to debug it.

    I hope this helped.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.