COUNTIF ?

coccio

Board Regular
Joined
Mar 19, 2002
Messages
140
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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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,144,354
Messages
5,723,884
Members
422,524
Latest member
wirkkarn

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