Solved Why does the following error message Too few arguments

April 21, 2016 at 22:08:06
Specs: Windows 7
appear for the following function
=IF(COUNT($AI$3:$AI$152)=0,"",IF(COUNTIF($AI$3:$AI$152,MAX($AI$3:$AI$152))>1,"No Sole Tipper Winner this round",INDEX($E$3:$E$152&" "&INDEX($D$3:$D$152&" won the $20 weekly Sole Tipper Prize with "&MAX($AI$3:$AI$152)&" winners",MATCH(MAX($AI$3:$AI$152),$AI$3:$AI$152,0))))

See More: Why does the following error message Too few arguments

Report •


✔ Best Answer
April 22, 2016 at 11:18:14
Chrisbucky,

ijack is correct that you need to include at least 2 arguments for each INDEX function.

It appears that you are trying to use the single MATCH(MAX(...) function as the [row num] argument for your concatenated INDEX functions. You can't do that. Each INDEX function has to have it's own dedicated [row num] argument.

Is there any chance that this is what you are looking for? In this version, the [row num] argument is supplied to each INDEX function by MATCHing the MAX value in AI3:AI152

=IF(COUNT($AI$3:$AI$152)=0,"",
IF(COUNTIF($AI$3:$AI$152,MAX($AI$3:$AI$152))>1,
"No Sole Tipper Winner this round",
INDEX($E$3:$E$152,MATCH(MAX($AI$3:$AI$152),$AI$3:$AI$152,0))
&" "&
INDEX($D$3:$D$152,MATCH(MAX($AI$3:$AI$152),$AI$3:$AI$152,0))
&" won the $20 weekly Sole Tipper Prize with "
&MAX($AI$3:$AI$152)&" winners"))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03



#1
April 22, 2016 at 02:31:15
Where and when are you seeing this?

The contents look like malware. If the computer is bootable run these three little freebies in the order given:

AdwCleaner:
https://toolslib.net/downloads/view...
(blue "Download Now" button on right).
Download and "Save" the file somewhere. Go to the saved file then double click it to run the program. Use the "Scan" button, followed by the "Cleaning" button.

Junkware Removal Tool (JRT)
https://www.malwarebytes.org/junkwa...
(blue Download button).
Download and "Save" the file somewhere. Go to the saved file then double click it to run JRT. It might appear to have stopped at times or flash the screen but sit tight until it has finished.

MalwareBytes:
https://www.malwarebytes.org/
(use the "download" button rather than the "buy" button).
Install and Run the program but before running the Scan go to "Settings > Detection and Protection" and put a checkmark in "Scan for rootkits". Quarantine anything it finds.

Please copy/paste the logs on here.

EDIT:
Struck out malware checks in view of responses #2 & 3.

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#2
April 22, 2016 at 03:26:20
The first INDEX function has only one parameter but needs at least two. You also appear to be missing a closing ")". Try building the function one step at a time.

@#1 This is an Excel function, not an indication of malware.


Report •

#3
April 22, 2016 at 07:04:48
ijack,

If I may pick a nit....

re: "This is an Excel function..."

To be more accurate, "This is an Excel formula..."

As I am sure you know, a function is a built-in operation, such as SUM(), INDEX(), etc.

A formula is something that the user defines and will typically contain one or more functions.

message edited by DerbyDad03


Report •

Related Solutions

#4
April 22, 2016 at 07:15:52
The function works fine with only 1 index but when I enter the additional index the problem occurs

Report •

#5
April 22, 2016 at 07:54:08
You need to ensure that both INDEX functions have at least two parameters. You also need to ensure that the number of opeing and closing parentheses match.

Report •

#6
April 22, 2016 at 11:18:14
✔ Best Answer
Chrisbucky,

ijack is correct that you need to include at least 2 arguments for each INDEX function.

It appears that you are trying to use the single MATCH(MAX(...) function as the [row num] argument for your concatenated INDEX functions. You can't do that. Each INDEX function has to have it's own dedicated [row num] argument.

Is there any chance that this is what you are looking for? In this version, the [row num] argument is supplied to each INDEX function by MATCHing the MAX value in AI3:AI152

=IF(COUNT($AI$3:$AI$152)=0,"",
IF(COUNTIF($AI$3:$AI$152,MAX($AI$3:$AI$152))>1,
"No Sole Tipper Winner this round",
INDEX($E$3:$E$152,MATCH(MAX($AI$3:$AI$152),$AI$3:$AI$152,0))
&" "&
INDEX($D$3:$D$152,MATCH(MAX($AI$3:$AI$152),$AI$3:$AI$152,0))
&" won the $20 weekly Sole Tipper Prize with "
&MAX($AI$3:$AI$152)&" winners"))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03


Report •

#7
April 22, 2016 at 16:32:54
That works, Cheers.
Thanks everyone for your input

Report •

#8
April 22, 2016 at 16:45:13
OK, so what exactly is a "Sole Tipper" competition?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •


Ask Question