ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlook up and if formula (https://www.excelbanter.com/excel-worksheet-functions/29423-vlook-up-if-formula.html)

Stuart

vlook up and if formula
 
hi

im playing with a spreadsheet at the moment trying to use vlookup which i
have working

however, instead of when the vlookup value providing a value of n/a when
false, is there a way that i can use an if statement to return a value of "0"
(zero)

thanks

stuart

Leo Heuser

Hi Stuart

One way:

=IF(ISERROR(Your formula),0,Your formula)

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Stuart" skrev i en meddelelse
...
hi

im playing with a spreadsheet at the moment trying to use vlookup which i
have working

however, instead of when the vlookup value providing a value of n/a when
false, is there a way that i can use an if statement to return a value of
"0"
(zero)

thanks

stuart




arno

Hi Stuart,

however, instead of when the vlookup value providing a value of n/a
when false, is there a way that i can use an if statement to return a
value of "0" (zero)


you need your formula twice, eg.

=if(iserror(vlookup(a1,data,2,false)),0,vlookup(a1 ,data,2,false))

where 0 in the middle of the formula is what you want. sometimes I use
"not found", "---" or just "", depending on what is usefull in the
situation, 0 is fine, too.

arno



Duke Carey

=if(isna(vlookup formula),0,vlookup formula)

"Stuart" wrote:

hi

im playing with a spreadsheet at the moment trying to use vlookup which i
have working

however, instead of when the vlookup value providing a value of n/a when
false, is there a way that i can use an if statement to return a value of "0"
(zero)

thanks

stuart


stuart

thanks for everyone's help

stuart




"Stuart" wrote:

hi

im playing with a spreadsheet at the moment trying to use vlookup which i
have working

however, instead of when the vlookup value providing a value of n/a when
false, is there a way that i can use an if statement to return a value of "0"
(zero)

thanks

stuart


Leo Heuser

You're welcome, Stuart :-)

LeoH



"stuart" skrev i en meddelelse
...
thanks for everyone's help

stuart





All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com