Too many arguments for function

Bandito1

Board Regular
Joined
Oct 18, 2018
Messages
233
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I use the following formula to check if a number is in a list.
The number can be with or without a "G" infront

=IF(A3="";"";IF(ISNA(VLOOKUP(SUBSTITUTE(A3;"G";"")+0;'2016-2022'!B:B;1;FALSE));"No";"Yes"))

Now i try to rebuild this formula to show the value in column 9. If there is nothing in that column it should show "no comments"

When i use =IFERROR(VLOOKUP(A3;'2016-2022'!B:J;9;FALSE);"No comments") it works but it doesn't work if there is a G infront of the number.

Now i tried IF(A4="";"";IF(ISNA(VLOOKUP(SUBSTITUTE(A4;"G";"")+0;'2016-2022'!B:J;0;FALSE));"No comments";"") but now i get no value if there is a value in the column. It's always ""

Excel keeps going on not responding when i use xl2bb on the file.
Sorry
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try
Excel Formula:
=IF(A4="";"";IFNA(VLOOKUP(SUBSTITUTE(A4;"G";"")+0,'2016-2022'!B:J;9;FALSE),"No comments"))
 
Upvote 0
That works, thank you

1 small thing; it shows "0" instead of "no comments" when the number is in the list
If the number isn't in the list it shows "no comments"..

In both cases it should no comments if there are no comments.
 
Upvote 0
it shows "0" instead of "no comments" when the number is in the list
.. only if the column J cell is empty for that row.

Assuming that any values in column J are text and not numbers, try
Excel Formula:
=IF(A4="";"";IFNA(VLOOKUP(SUBSTITUTE(A4;"G";"")+0,'2016-2022'!B:J;9;FALSE)&"","No comments"))
 
Upvote 0
Now it only shows only "no comments" if the number is not in the list

It leaves the cell blank if the number is in the list
 
Upvote 0
That is not the case for me. here is my sample data and results (note my system uses comma separators in formulas).
If you can't find what is wrong, perhaps you could post your small sample of each sheet with like I have so that we can investigate?

22 11 30.xlsm
BJ
1Lookup NumData
2123data 1
3124data 2
4125data 3
5126data 4
6127data 5
7128data 6
8129data 7
9130data 8
10131data 9
11132
12133
13134
14135data 13
2016-2022


Are these the results that you would want from my sample data?

22 11 30.xlsm
AB
4G123data 1
5134 
6200No comments
7 
8125data 3
9G350No comments
10127data 5
11G127data 5
Sheet5
Cell Formulas
RangeFormula
B4:B11B4=IF(A4="","",IFNA(VLOOKUP(SUBSTITUTE(A4,"G","")+0,'2016-2022'!B:J,9,FALSE)&"","No comments"))
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top