Delete N/A when using VLOOKUPReturn empty cell from formula in Excelusing hyperlink in a vlookup functionif error and vlookup in vba macrosExcel VLOOKUP between two sheets failingcopy data from each cell in range loop and paste it on another sheetUsing nesting vlookup formulas for use in automation codeUsing Vlookup to copy and paste data into a separate worksheet using VBAVLOOKUP for different sheetsVBA IFERROR to VLOOKUP referencing another sheetCopy values to a sheet containing formulas without formulas being removed

Stop email from sending using AMPscript

Lípínguapua dopo Pêpê

Is there any way I will not use l'Hôpital's rule here?

What's the relationship betweeen MS-DOS and XENIX?

Why won't the Republicans use a superdelegate system like the DNC in their nomination process?

onomatopoeia for cluelessness

Why do my bicycle brakes get worse and feel more 'squishy" over time?

How can God warn people of the upcoming rapture without disrupting society?

What is the hottest thing in the universe?

Did Pope Urban II issue the papal bull "terra nullius" in 1095?

How to proceed further in this Arithmetico-Geometric Progression problem

Help, I cannot decide when to start the story

Output the list of musical notes

Bringing Power Supplies on Plane?

What should we do with manuals from the 80s?

Weird resistor with dots around it

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?

What would it take to get a message to another star?

Solving pricing problem heuristically in column generation algorithm for VRP

Is there a word for returning to unpreparedness?

Unconventional examples of mathematical modelling

Do I have to cite common CS algorithms?

What is the opposite of "hunger level"?

How to prevent criminal gangs from making/buying guns?



Delete N/A when using VLOOKUP


Return empty cell from formula in Excelusing hyperlink in a vlookup functionif error and vlookup in vba macrosExcel VLOOKUP between two sheets failingcopy data from each cell in range loop and paste it on another sheetUsing nesting vlookup formulas for use in automation codeUsing Vlookup to copy and paste data into a separate worksheet using VBAVLOOKUP for different sheetsVBA IFERROR to VLOOKUP referencing another sheetCopy values to a sheet containing formulas without formulas being removed






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to bring the values from Sheet2 to Sheet1 using VLOOKUP formula (in VBA, after using the formula I copy paste in order to just see the value). But when the cells from Sheet2 are empty I get the "#N/A", which I don't want. What can I do to get the cell empty if there isn't any value, like replace the #N/A with nothing.



I have tried using the IFERROR formula, but I get 0 instead of nothing.



comm.Range(.Cells(2, "C"), .Cells(lr, "C")).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-2],Sheet2!C[-2]:C[22],3,0),"""")"









share|improve this question


























  • Works fine for me. You will get a 0 if the cell has a 0 else you will get a "blank value"

    – Siddharth Rout
    Mar 27 at 11:44












  • What happens if you actually try that formula directly in a cell?

    – Zac
    Mar 27 at 11:46











  • @Zac if works by using it directly in the cell, but I cannot. The client uses an userform to complete the empty data after the VLOOKUP, this is why I used it in VBA, because after I copy paste it to remove the formula

    – Anca Vulc
    Mar 27 at 12:02

















1















I'm trying to bring the values from Sheet2 to Sheet1 using VLOOKUP formula (in VBA, after using the formula I copy paste in order to just see the value). But when the cells from Sheet2 are empty I get the "#N/A", which I don't want. What can I do to get the cell empty if there isn't any value, like replace the #N/A with nothing.



I have tried using the IFERROR formula, but I get 0 instead of nothing.



comm.Range(.Cells(2, "C"), .Cells(lr, "C")).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-2],Sheet2!C[-2]:C[22],3,0),"""")"









share|improve this question


























  • Works fine for me. You will get a 0 if the cell has a 0 else you will get a "blank value"

    – Siddharth Rout
    Mar 27 at 11:44












  • What happens if you actually try that formula directly in a cell?

    – Zac
    Mar 27 at 11:46











  • @Zac if works by using it directly in the cell, but I cannot. The client uses an userform to complete the empty data after the VLOOKUP, this is why I used it in VBA, because after I copy paste it to remove the formula

    – Anca Vulc
    Mar 27 at 12:02













1












1








1








I'm trying to bring the values from Sheet2 to Sheet1 using VLOOKUP formula (in VBA, after using the formula I copy paste in order to just see the value). But when the cells from Sheet2 are empty I get the "#N/A", which I don't want. What can I do to get the cell empty if there isn't any value, like replace the #N/A with nothing.



I have tried using the IFERROR formula, but I get 0 instead of nothing.



comm.Range(.Cells(2, "C"), .Cells(lr, "C")).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-2],Sheet2!C[-2]:C[22],3,0),"""")"









share|improve this question
















I'm trying to bring the values from Sheet2 to Sheet1 using VLOOKUP formula (in VBA, after using the formula I copy paste in order to just see the value). But when the cells from Sheet2 are empty I get the "#N/A", which I don't want. What can I do to get the cell empty if there isn't any value, like replace the #N/A with nothing.



I have tried using the IFERROR formula, but I get 0 instead of nothing.



comm.Range(.Cells(2, "C"), .Cells(lr, "C")).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-2],Sheet2!C[-2]:C[22],3,0),"""")"






excel vba excel-formula






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 12:58









Pᴇʜ

31.3k6 gold badges30 silver badges56 bronze badges




31.3k6 gold badges30 silver badges56 bronze badges










asked Mar 27 at 11:39









Anca VulcAnca Vulc

676 bronze badges




676 bronze badges















  • Works fine for me. You will get a 0 if the cell has a 0 else you will get a "blank value"

    – Siddharth Rout
    Mar 27 at 11:44












  • What happens if you actually try that formula directly in a cell?

    – Zac
    Mar 27 at 11:46











  • @Zac if works by using it directly in the cell, but I cannot. The client uses an userform to complete the empty data after the VLOOKUP, this is why I used it in VBA, because after I copy paste it to remove the formula

    – Anca Vulc
    Mar 27 at 12:02

















  • Works fine for me. You will get a 0 if the cell has a 0 else you will get a "blank value"

    – Siddharth Rout
    Mar 27 at 11:44












  • What happens if you actually try that formula directly in a cell?

    – Zac
    Mar 27 at 11:46











  • @Zac if works by using it directly in the cell, but I cannot. The client uses an userform to complete the empty data after the VLOOKUP, this is why I used it in VBA, because after I copy paste it to remove the formula

    – Anca Vulc
    Mar 27 at 12:02
















Works fine for me. You will get a 0 if the cell has a 0 else you will get a "blank value"

– Siddharth Rout
Mar 27 at 11:44






Works fine for me. You will get a 0 if the cell has a 0 else you will get a "blank value"

– Siddharth Rout
Mar 27 at 11:44














What happens if you actually try that formula directly in a cell?

– Zac
Mar 27 at 11:46





What happens if you actually try that formula directly in a cell?

– Zac
Mar 27 at 11:46













@Zac if works by using it directly in the cell, but I cannot. The client uses an userform to complete the empty data after the VLOOKUP, this is why I used it in VBA, because after I copy paste it to remove the formula

– Anca Vulc
Mar 27 at 12:02





@Zac if works by using it directly in the cell, but I cannot. The client uses an userform to complete the empty data after the VLOOKUP, this is why I used it in VBA, because after I copy paste it to remove the formula

– Anca Vulc
Mar 27 at 12:02












1 Answer
1






active

oldest

votes


















1














  • You could use =IFNA instead of =IFERROR because the code in case of error generate #N/A error.

  • Lastly, in your formula after the number of column you want to return (in your case column number 3) you use number 0 instead of TRUE or FALSE.

The below code is not the answer but a sample of the formula.



Code Sample:



=IFNA(VLOOKUP(A2,$D$1:$E$2,2,FALSE),"") 'In excel

.FormulaR1C1 = "=VLOOKUP(RC[-1],R1C4:R2C5,2,FALSE)" 'In VBA





share|improve this answer



























  • In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

    – Forward Ed
    Mar 27 at 12:05










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55376310%2fdelete-n-a-when-using-vlookup%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














  • You could use =IFNA instead of =IFERROR because the code in case of error generate #N/A error.

  • Lastly, in your formula after the number of column you want to return (in your case column number 3) you use number 0 instead of TRUE or FALSE.

The below code is not the answer but a sample of the formula.



Code Sample:



=IFNA(VLOOKUP(A2,$D$1:$E$2,2,FALSE),"") 'In excel

.FormulaR1C1 = "=VLOOKUP(RC[-1],R1C4:R2C5,2,FALSE)" 'In VBA





share|improve this answer



























  • In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

    – Forward Ed
    Mar 27 at 12:05















1














  • You could use =IFNA instead of =IFERROR because the code in case of error generate #N/A error.

  • Lastly, in your formula after the number of column you want to return (in your case column number 3) you use number 0 instead of TRUE or FALSE.

The below code is not the answer but a sample of the formula.



Code Sample:



=IFNA(VLOOKUP(A2,$D$1:$E$2,2,FALSE),"") 'In excel

.FormulaR1C1 = "=VLOOKUP(RC[-1],R1C4:R2C5,2,FALSE)" 'In VBA





share|improve this answer



























  • In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

    – Forward Ed
    Mar 27 at 12:05













1












1








1







  • You could use =IFNA instead of =IFERROR because the code in case of error generate #N/A error.

  • Lastly, in your formula after the number of column you want to return (in your case column number 3) you use number 0 instead of TRUE or FALSE.

The below code is not the answer but a sample of the formula.



Code Sample:



=IFNA(VLOOKUP(A2,$D$1:$E$2,2,FALSE),"") 'In excel

.FormulaR1C1 = "=VLOOKUP(RC[-1],R1C4:R2C5,2,FALSE)" 'In VBA





share|improve this answer















  • You could use =IFNA instead of =IFERROR because the code in case of error generate #N/A error.

  • Lastly, in your formula after the number of column you want to return (in your case column number 3) you use number 0 instead of TRUE or FALSE.

The below code is not the answer but a sample of the formula.



Code Sample:



=IFNA(VLOOKUP(A2,$D$1:$E$2,2,FALSE),"") 'In excel

.FormulaR1C1 = "=VLOOKUP(RC[-1],R1C4:R2C5,2,FALSE)" 'In VBA






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 27 at 11:58

























answered Mar 27 at 11:53









Error 1004Error 1004

5,3552 gold badges8 silver badges25 bronze badges




5,3552 gold badges8 silver badges25 bronze badges















  • In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

    – Forward Ed
    Mar 27 at 12:05

















  • In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

    – Forward Ed
    Mar 27 at 12:05
















In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

– Forward Ed
Mar 27 at 12:05





In excel, TRUE and FALSE are treated as 1 and 0 respectively. I use 1 and 0 for the true false portion VLOOKUP/HLOOKUP all the time without issue.

– Forward Ed
Mar 27 at 12:05








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55376310%2fdelete-n-a-when-using-vlookup%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해