COUNTIF ?

coccio

Board Regular
Joined
Mar 19, 2002
Messages
147
Office Version
  1. 2016
Hi,

I have a formula below:

=INDEX('6707'!$B$1:$B$600,MATCH($A$1,'6707'!$A$1:$A$600,0)*1)

Which works fine for me but when there is no data the cell displays a #N/A

I’m trying to do the COUNTIF function but can’t seem to get it right.

How do I do remove the #N/A to above formula?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
On 2002-10-23 09:19, coccio wrote:
Hi,

I have a formula below:

=INDEX('6707'!$B$1:$B$600,MATCH($A$1,'6707'!$A$1:$A$600,0)*1)

Which works fine for me but when there is no data the cell displays a #N/A

I’m trying to do the COUNTIF function but can’t seem to get it right.

How do I do remove the #N/A to above formula?

Try:

=IF(ISNUMBER(MATCH($A$1,'6707'!$A$1:$A$600,0)),INDEX('6707'!$B$1:$B$600,MATCH($A$1,'6707'!$A$1:$A$600,0)),"ValueToReturnInsteadOf#N/A")

If you have the morefunc add-in, you can use:

=IF(ISNA(SETV(INDEX('6707'!$B$1:$B$600,MATCH($A$1,'6707'$A$1:$A$600,0)))),"ValueToReturnInsteadOf#N/A",GETV())

Addendum. Also an attractive approach...

In B1 enter:

=MATCH($A$1,'6707'$A$1:$A$600,0)

In C1 enter:

=IF(ISNUMBER(B1),INDEX('6707'!$B$1:$B$600,B1),ValueToReturnInsteadOf#N/A")
This message was edited by Aladin Akyurek on 2002-10-23 09:28
 

Forum statistics

Threads
1,181,332
Messages
5,929,362
Members
436,664
Latest member
plobo4

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
Top