Help showing #N/A as a 0

HughBuchan

New Member
Joined
Jul 26, 2006
Messages
14
Looking for a little help...

I am using a vlookup to pull data into a spreadsheet that summarizes information about marketing campaigns. Currently if the vlookup does not find data on a specific lookup it returns a #N/A.

I have a row that totals up all the results of each campaign, but if one of the results that is incorportated in the total is a #N/A then the total shows up as a #N/A. To avoid this I have been going in and typing in a 0, but I'm trying to make these spreadsheets to be as automated as possible, and have lookup return a zero if it does not find data.

Is there a way to do this?

Thanks,

-hugh
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Incorporate your vlookup in an IF() statement

e.g =If(ISNA(vlookup()),0,vlookup())

replacing the Vlookup() with your actual Vlookup formula.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Looking for a little help...

I am using a vlookup to pull data into a spreadsheet that summarizes information about marketing campaigns. Currently if the vlookup does not find data on a specific lookup it returns a #N/A.

I have a row that totals up all the results of each campaign, but if one of the results that is incorportated in the total is a #N/A then the total shows up as a #N/A. To avoid this I have been going in and typing in a 0, but I'm trying to make these spreadsheets to be as automated as possible, and have lookup return a zero if it does not find data.

Is there a way to do this?

Thanks,

-hugh

You can keep #N/A's as is and invoke:

=SUM(SUMIF(Range,{"<0",">0"}))

to sum the range that includes #N/A's.
 

ElBombay

Board Regular
Joined
Aug 3, 2005
Messages
185
An expansion on the "ISNA" response would be

If(ISERROR(vlookup()),0,vlookup())

where the "vlookup()" can be repalced with an equation or any other function and the 0 can be replaced with a flag or instruction, as the situation requires.
 

Forum statistics

Threads
1,136,263
Messages
5,674,710
Members
419,521
Latest member
Jasonnie

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