What do I use instead of COUNTA?

HRSylver

Board Regular
Joined
Jun 12, 2008
Messages
101
Good morning Excel-ers. I have an if statement that will print two different texts depending on the outcome and my logical test is:

COUNTA(VLOOKUP(C14,Sheet2!$D$2:$F$400,3,FALSE))=1

When C14 gives a number that's NOT in the specified range on Sheet2 I want it to return a 0 so 0 won't equal 1. Instead I get #N/A which somehow gets counted a 1 which throws my whole operation off.

It seems COUNTA is the wrong command to use... What command do I use to just return a 0 or 1?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try

=IF(ISNUMBER(MATCH(C14,Sheet2!$D$2:$D$400,0)),VLOOKUP(C14,Sheet2!$D$2:$F$400,3,FALSE),0)

Hope this helps...
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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