#N/A

palley

New Member
Joined
Jan 15, 2004
Messages
18
I use this line in my spreadsheet to pull in a formula. If it finds a formula it pulls it in. If not it puts #N/A. Is there anything I can add to the vlookup line that will keep it from putting #N/A on the other lines?

=VLOOKUP(A3906,DESC,2,FALSE)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Normally I would use ISNUMBER MATCH, but since you are using a named range. ISNA should suffice:

=IF(ISNA(VLOOKUP(A3906,DESC,2,FALSE)),"",VLOOKUP(A3906,DESC,2,FALSE))
 
Upvote 0
Try;

If the output is number,

=LOOKUP(1E+307,CHOOSE({1,2},0,VLOOKUP(A3906,DESC,2,FALSE)))

Should return zero, if it is #N/A

If output is text,

=LOOKUP(REPT("Z",250),CHOOSE({1,2},"",VLOOKUP(A3906,DESC,2,FALSE)))

Should return blank, id it is #N/A
 
Upvote 0
I use this line in my spreadsheet to pull in a formula. If it finds a formula it pulls it in. If not it puts #N/A. Is there anything I can add to the vlookup line that will keep it from putting #N/A on the other lines?

=VLOOKUP(A3906,DESC,2,FALSE)

What does mean "to pull in a formula"? Could you give an exemple?
 
Upvote 0
=VLOOKUP(A3906,DESC,2,FALSE)
on the table named desc I have a list of formulas and a number assigned to this formula. On the pivot table when it finds the number it looks at desc for that number and returns the formula assigned to it
 
Upvote 0
=VLOOKUP(A3906,DESC,2,FALSE)
on the table named desc I have a list of formulas and a number assigned to this formula. On the pivot table when it finds the number it looks at desc for that number and returns the formula assigned to it

I'd like very much to see a formula that gets pulled by the above formula.
Is it a string what it returns or a number following a calculation?
 
Upvote 0
desc TAB
COLUMN A COLUMN B
TENN147 TEST1
TENN148 TEST2
TENN149 TEST3

ON PIVOT TABLE WHEN IT SEES TENN147 IT PUTS TEST1 IN THE 2ND COLUMN
 
Upvote 0
desc TAB
COLUMN A COLUMN B
TENN147 TEST1
TENN148 TEST2
TENN149 TEST3

ON PIVOT TABLE WHEN IT SEES TENN147 IT PUTS TEST1 IN THE 2ND COLUMN

Ok. Thanks.

If you are on 2007 or later...

=IFERROR(VLOOKUP(A3906,DESC,2,0),"Not Found")

You can replace the last bit anything more appropriate, including "", a blank.
By the way, 0 as fourth argument stands for FALSE, 1 would stand for TRUE.

On a previous version, you have a few options like...

=LOOKUP(REPT("z",255),CHOOSE({1,2},"Not Found",VLOOKUP(A3906,DESC,2,0)))

=IF(ISNA(VLOOKUP(A3906,DESC,1,0),"Not Found",VLOOKUP(A3906,DESC,2,0))
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,703
Members
452,938
Latest member
babeneker

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