Excel formula unique list formula not working, if counta = 1










1















I have the following formula to make a unique list from column plant in table 15:



=IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));"")


This formula is working, but when there is just 1 value in column plant the formula gives a value of 0. This is wrong because it should return the value.
Does anyone know how I can adapt this formula to make it work?



I wanted to change it to this:



=IF(COUNTA(Tabel15[plant])>0;INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));Kopie - datablad$G$2)


But it doesn't work either.










share|improve this question






















  • Could you please make a small mock example how your table looks like! I've hard time to interpret your formula as it's stated (the logic is unclear). Thanks!

    – Wizhi
    Nov 13 '18 at 10:42











  • Could you tell me how to post a file?

    – Mischa Urlings
    Nov 13 '18 at 11:13











  • Edit your question and add a dropbox link/google spreadsheet link. I would recommend to have print screen of a mock example here as it's more preferred.

    – Wizhi
    Nov 13 '18 at 11:16












  • Here is the link to an example file. In the first sheet(datablad) you can filter on assets. You don't have to use the second sheet. In the third sheet, there is a button with a macro into it. If you don't filter on the first sheet and then click the button, the formula in Q3 on the third sheet works fine (ignore the macro error). But when you filter only to 1 asset and run the macro, the formula doesn't work anymore and gives a value of (""). dropbox.com/s/bnb7lw28m2dos2p/Stackoverflow%20example.xlsm?dl=0

    – Mischa Urlings
    Nov 13 '18 at 12:14















1















I have the following formula to make a unique list from column plant in table 15:



=IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));"")


This formula is working, but when there is just 1 value in column plant the formula gives a value of 0. This is wrong because it should return the value.
Does anyone know how I can adapt this formula to make it work?



I wanted to change it to this:



=IF(COUNTA(Tabel15[plant])>0;INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));Kopie - datablad$G$2)


But it doesn't work either.










share|improve this question






















  • Could you please make a small mock example how your table looks like! I've hard time to interpret your formula as it's stated (the logic is unclear). Thanks!

    – Wizhi
    Nov 13 '18 at 10:42











  • Could you tell me how to post a file?

    – Mischa Urlings
    Nov 13 '18 at 11:13











  • Edit your question and add a dropbox link/google spreadsheet link. I would recommend to have print screen of a mock example here as it's more preferred.

    – Wizhi
    Nov 13 '18 at 11:16












  • Here is the link to an example file. In the first sheet(datablad) you can filter on assets. You don't have to use the second sheet. In the third sheet, there is a button with a macro into it. If you don't filter on the first sheet and then click the button, the formula in Q3 on the third sheet works fine (ignore the macro error). But when you filter only to 1 asset and run the macro, the formula doesn't work anymore and gives a value of (""). dropbox.com/s/bnb7lw28m2dos2p/Stackoverflow%20example.xlsm?dl=0

    – Mischa Urlings
    Nov 13 '18 at 12:14













1












1








1


0






I have the following formula to make a unique list from column plant in table 15:



=IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));"")


This formula is working, but when there is just 1 value in column plant the formula gives a value of 0. This is wrong because it should return the value.
Does anyone know how I can adapt this formula to make it work?



I wanted to change it to this:



=IF(COUNTA(Tabel15[plant])>0;INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));Kopie - datablad$G$2)


But it doesn't work either.










share|improve this question














I have the following formula to make a unique list from column plant in table 15:



=IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));"")


This formula is working, but when there is just 1 value in column plant the formula gives a value of 0. This is wrong because it should return the value.
Does anyone know how I can adapt this formula to make it work?



I wanted to change it to this:



=IF(COUNTA(Tabel15[plant])>0;INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$2:$Q2;Tabel15[Plant]);0));Kopie - datablad$G$2)


But it doesn't work either.







excel excel-formula






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 8:23









Mischa UrlingsMischa Urlings

478




478












  • Could you please make a small mock example how your table looks like! I've hard time to interpret your formula as it's stated (the logic is unclear). Thanks!

    – Wizhi
    Nov 13 '18 at 10:42











  • Could you tell me how to post a file?

    – Mischa Urlings
    Nov 13 '18 at 11:13











  • Edit your question and add a dropbox link/google spreadsheet link. I would recommend to have print screen of a mock example here as it's more preferred.

    – Wizhi
    Nov 13 '18 at 11:16












  • Here is the link to an example file. In the first sheet(datablad) you can filter on assets. You don't have to use the second sheet. In the third sheet, there is a button with a macro into it. If you don't filter on the first sheet and then click the button, the formula in Q3 on the third sheet works fine (ignore the macro error). But when you filter only to 1 asset and run the macro, the formula doesn't work anymore and gives a value of (""). dropbox.com/s/bnb7lw28m2dos2p/Stackoverflow%20example.xlsm?dl=0

    – Mischa Urlings
    Nov 13 '18 at 12:14

















  • Could you please make a small mock example how your table looks like! I've hard time to interpret your formula as it's stated (the logic is unclear). Thanks!

    – Wizhi
    Nov 13 '18 at 10:42











  • Could you tell me how to post a file?

    – Mischa Urlings
    Nov 13 '18 at 11:13











  • Edit your question and add a dropbox link/google spreadsheet link. I would recommend to have print screen of a mock example here as it's more preferred.

    – Wizhi
    Nov 13 '18 at 11:16












  • Here is the link to an example file. In the first sheet(datablad) you can filter on assets. You don't have to use the second sheet. In the third sheet, there is a button with a macro into it. If you don't filter on the first sheet and then click the button, the formula in Q3 on the third sheet works fine (ignore the macro error). But when you filter only to 1 asset and run the macro, the formula doesn't work anymore and gives a value of (""). dropbox.com/s/bnb7lw28m2dos2p/Stackoverflow%20example.xlsm?dl=0

    – Mischa Urlings
    Nov 13 '18 at 12:14
















Could you please make a small mock example how your table looks like! I've hard time to interpret your formula as it's stated (the logic is unclear). Thanks!

– Wizhi
Nov 13 '18 at 10:42





Could you please make a small mock example how your table looks like! I've hard time to interpret your formula as it's stated (the logic is unclear). Thanks!

– Wizhi
Nov 13 '18 at 10:42













Could you tell me how to post a file?

– Mischa Urlings
Nov 13 '18 at 11:13





Could you tell me how to post a file?

– Mischa Urlings
Nov 13 '18 at 11:13













Edit your question and add a dropbox link/google spreadsheet link. I would recommend to have print screen of a mock example here as it's more preferred.

– Wizhi
Nov 13 '18 at 11:16






Edit your question and add a dropbox link/google spreadsheet link. I would recommend to have print screen of a mock example here as it's more preferred.

– Wizhi
Nov 13 '18 at 11:16














Here is the link to an example file. In the first sheet(datablad) you can filter on assets. You don't have to use the second sheet. In the third sheet, there is a button with a macro into it. If you don't filter on the first sheet and then click the button, the formula in Q3 on the third sheet works fine (ignore the macro error). But when you filter only to 1 asset and run the macro, the formula doesn't work anymore and gives a value of (""). dropbox.com/s/bnb7lw28m2dos2p/Stackoverflow%20example.xlsm?dl=0

– Mischa Urlings
Nov 13 '18 at 12:14





Here is the link to an example file. In the first sheet(datablad) you can filter on assets. You don't have to use the second sheet. In the third sheet, there is a button with a macro into it. If you don't filter on the first sheet and then click the button, the formula in Q3 on the third sheet works fine (ignore the macro error). But when you filter only to 1 asset and run the macro, the formula doesn't work anymore and gives a value of (""). dropbox.com/s/bnb7lw28m2dos2p/Stackoverflow%20example.xlsm?dl=0

– Mischa Urlings
Nov 13 '18 at 12:14












2 Answers
2






active

oldest

votes


















1














Good mock example. Try and see if this works:



The formula counts the unique cells against another list. The unique list expects to take the first row, no matter what. It also expects you to have more than one value in your duplicate list. If it doesn't you can't compare since it expect duplicates and it throws an error, #N/A. This is mask as blank cell since it's wrapped in IFERROR:



"Unique formula" = IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),"")



To solve this we check how many values it exist in our duplicate list:



=IF(COUNTA(Tabel15[Plant])>1,... "Unique formula" ... ,Tabel15[Plant]) //***//



This will give us this result.



enter image description here



Then you probably don't want duplicates...



So we need to check if previous rows contain any of the values the formula would return.
The VLOOKUP formula do that for us, and as lookup value we use the formula above //***// and lookup range will be our current column: $Q$1:Q2. NOTICE this is a dynamic range so Q2 is relative reference (no $).



=IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),$Q$1:Q2,1,FALSE))



So the Final result we need to apply is this in Cell Q3:



=IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),Analyses!$Q$1:Q2,1,FALSE)),IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),"")


enter image description here




The macro error can be ignored by:



If Not IsError(Sheets("Hulpblad").Range("B6").Value) Then
t = Sheets("Hulpblad").Range("B6").Value
'Code...
End If





share|improve this answer

























  • The formula gives an error saying that I have too few arguments?

    – Mischa Urlings
    Nov 14 '18 at 8:23











  • This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

    – Wizhi
    Nov 14 '18 at 8:46











  • Have copy of my test.

    – Wizhi
    Nov 14 '18 at 8:53











  • It works! Thank you for your help!!

    – Mischa Urlings
    Nov 14 '18 at 13:48











  • Lovely to hear :)!! Take care.

    – Wizhi
    Nov 14 '18 at 14:59


















0














there is no problem in your formula, it is just telling that there are blanks in the range, 0 means blank. the formula is treating the blank as a value and also considering it in the unique value calculations.



If you want to remove 0 you can just insert an if over your formula to remove it. like



=if(formula = 0, "", formula)


or in orignal form



=IF( (IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))=0,"",IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))


or go in the cell formatting and change the format to display 0 as a dash.



sometimes blank is also used as error checking, you can apply such formulae as well to check how many are blank, maybe that would someday be used to check any data entry problems.






share|improve this answer






















    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%2f53276689%2fexcel-formula-unique-list-formula-not-working-if-counta-1%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Good mock example. Try and see if this works:



    The formula counts the unique cells against another list. The unique list expects to take the first row, no matter what. It also expects you to have more than one value in your duplicate list. If it doesn't you can't compare since it expect duplicates and it throws an error, #N/A. This is mask as blank cell since it's wrapped in IFERROR:



    "Unique formula" = IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),"")



    To solve this we check how many values it exist in our duplicate list:



    =IF(COUNTA(Tabel15[Plant])>1,... "Unique formula" ... ,Tabel15[Plant]) //***//



    This will give us this result.



    enter image description here



    Then you probably don't want duplicates...



    So we need to check if previous rows contain any of the values the formula would return.
    The VLOOKUP formula do that for us, and as lookup value we use the formula above //***// and lookup range will be our current column: $Q$1:Q2. NOTICE this is a dynamic range so Q2 is relative reference (no $).



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),$Q$1:Q2,1,FALSE))



    So the Final result we need to apply is this in Cell Q3:



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),Analyses!$Q$1:Q2,1,FALSE)),IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),"")


    enter image description here




    The macro error can be ignored by:



    If Not IsError(Sheets("Hulpblad").Range("B6").Value) Then
    t = Sheets("Hulpblad").Range("B6").Value
    'Code...
    End If





    share|improve this answer

























    • The formula gives an error saying that I have too few arguments?

      – Mischa Urlings
      Nov 14 '18 at 8:23











    • This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

      – Wizhi
      Nov 14 '18 at 8:46











    • Have copy of my test.

      – Wizhi
      Nov 14 '18 at 8:53











    • It works! Thank you for your help!!

      – Mischa Urlings
      Nov 14 '18 at 13:48











    • Lovely to hear :)!! Take care.

      – Wizhi
      Nov 14 '18 at 14:59















    1














    Good mock example. Try and see if this works:



    The formula counts the unique cells against another list. The unique list expects to take the first row, no matter what. It also expects you to have more than one value in your duplicate list. If it doesn't you can't compare since it expect duplicates and it throws an error, #N/A. This is mask as blank cell since it's wrapped in IFERROR:



    "Unique formula" = IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),"")



    To solve this we check how many values it exist in our duplicate list:



    =IF(COUNTA(Tabel15[Plant])>1,... "Unique formula" ... ,Tabel15[Plant]) //***//



    This will give us this result.



    enter image description here



    Then you probably don't want duplicates...



    So we need to check if previous rows contain any of the values the formula would return.
    The VLOOKUP formula do that for us, and as lookup value we use the formula above //***// and lookup range will be our current column: $Q$1:Q2. NOTICE this is a dynamic range so Q2 is relative reference (no $).



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),$Q$1:Q2,1,FALSE))



    So the Final result we need to apply is this in Cell Q3:



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),Analyses!$Q$1:Q2,1,FALSE)),IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),"")


    enter image description here




    The macro error can be ignored by:



    If Not IsError(Sheets("Hulpblad").Range("B6").Value) Then
    t = Sheets("Hulpblad").Range("B6").Value
    'Code...
    End If





    share|improve this answer

























    • The formula gives an error saying that I have too few arguments?

      – Mischa Urlings
      Nov 14 '18 at 8:23











    • This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

      – Wizhi
      Nov 14 '18 at 8:46











    • Have copy of my test.

      – Wizhi
      Nov 14 '18 at 8:53











    • It works! Thank you for your help!!

      – Mischa Urlings
      Nov 14 '18 at 13:48











    • Lovely to hear :)!! Take care.

      – Wizhi
      Nov 14 '18 at 14:59













    1












    1








    1







    Good mock example. Try and see if this works:



    The formula counts the unique cells against another list. The unique list expects to take the first row, no matter what. It also expects you to have more than one value in your duplicate list. If it doesn't you can't compare since it expect duplicates and it throws an error, #N/A. This is mask as blank cell since it's wrapped in IFERROR:



    "Unique formula" = IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),"")



    To solve this we check how many values it exist in our duplicate list:



    =IF(COUNTA(Tabel15[Plant])>1,... "Unique formula" ... ,Tabel15[Plant]) //***//



    This will give us this result.



    enter image description here



    Then you probably don't want duplicates...



    So we need to check if previous rows contain any of the values the formula would return.
    The VLOOKUP formula do that for us, and as lookup value we use the formula above //***// and lookup range will be our current column: $Q$1:Q2. NOTICE this is a dynamic range so Q2 is relative reference (no $).



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),$Q$1:Q2,1,FALSE))



    So the Final result we need to apply is this in Cell Q3:



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),Analyses!$Q$1:Q2,1,FALSE)),IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),"")


    enter image description here




    The macro error can be ignored by:



    If Not IsError(Sheets("Hulpblad").Range("B6").Value) Then
    t = Sheets("Hulpblad").Range("B6").Value
    'Code...
    End If





    share|improve this answer















    Good mock example. Try and see if this works:



    The formula counts the unique cells against another list. The unique list expects to take the first row, no matter what. It also expects you to have more than one value in your duplicate list. If it doesn't you can't compare since it expect duplicates and it throws an error, #N/A. This is mask as blank cell since it's wrapped in IFERROR:



    "Unique formula" = IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),"")



    To solve this we check how many values it exist in our duplicate list:



    =IF(COUNTA(Tabel15[Plant])>1,... "Unique formula" ... ,Tabel15[Plant]) //***//



    This will give us this result.



    enter image description here



    Then you probably don't want duplicates...



    So we need to check if previous rows contain any of the values the formula would return.
    The VLOOKUP formula do that for us, and as lookup value we use the formula above //***// and lookup range will be our current column: $Q$1:Q2. NOTICE this is a dynamic range so Q2 is relative reference (no $).



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF($Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),$Q$1:Q2,1,FALSE))



    So the Final result we need to apply is this in Cell Q3:



    =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),Analyses!$Q$1:Q2,1,FALSE)),IF(COUNTA(Tabel15[Plant])>1,IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$1:Q2,Tabel15[Plant]), 0)),""),Tabel15[Plant]),"")


    enter image description here




    The macro error can be ignored by:



    If Not IsError(Sheets("Hulpblad").Range("B6").Value) Then
    t = Sheets("Hulpblad").Range("B6").Value
    'Code...
    End If






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 14 '18 at 8:44

























    answered Nov 13 '18 at 20:49









    WizhiWizhi

    3,4441930




    3,4441930












    • The formula gives an error saying that I have too few arguments?

      – Mischa Urlings
      Nov 14 '18 at 8:23











    • This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

      – Wizhi
      Nov 14 '18 at 8:46











    • Have copy of my test.

      – Wizhi
      Nov 14 '18 at 8:53











    • It works! Thank you for your help!!

      – Mischa Urlings
      Nov 14 '18 at 13:48











    • Lovely to hear :)!! Take care.

      – Wizhi
      Nov 14 '18 at 14:59

















    • The formula gives an error saying that I have too few arguments?

      – Mischa Urlings
      Nov 14 '18 at 8:23











    • This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

      – Wizhi
      Nov 14 '18 at 8:46











    • Have copy of my test.

      – Wizhi
      Nov 14 '18 at 8:53











    • It works! Thank you for your help!!

      – Mischa Urlings
      Nov 14 '18 at 13:48











    • Lovely to hear :)!! Take care.

      – Wizhi
      Nov 14 '18 at 14:59
















    The formula gives an error saying that I have too few arguments?

    – Mischa Urlings
    Nov 14 '18 at 8:23





    The formula gives an error saying that I have too few arguments?

    – Mischa Urlings
    Nov 14 '18 at 8:23













    This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

    – Wizhi
    Nov 14 '18 at 8:46





    This one? : =IF(ISERROR(VLOOKUP(IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);Analyses!$Q$1:Q2;1;FALSE));IF(COUNTA(Tabel15[Plant])>1;IFERROR(INDEX(Tabel15[Plant];MATCH(0;COUNTIF(Analyses!$Q$1:Q2;Tabel15[Plant]); 0));"");Tabel15[Plant]);"")

    – Wizhi
    Nov 14 '18 at 8:46













    Have copy of my test.

    – Wizhi
    Nov 14 '18 at 8:53





    Have copy of my test.

    – Wizhi
    Nov 14 '18 at 8:53













    It works! Thank you for your help!!

    – Mischa Urlings
    Nov 14 '18 at 13:48





    It works! Thank you for your help!!

    – Mischa Urlings
    Nov 14 '18 at 13:48













    Lovely to hear :)!! Take care.

    – Wizhi
    Nov 14 '18 at 14:59





    Lovely to hear :)!! Take care.

    – Wizhi
    Nov 14 '18 at 14:59













    0














    there is no problem in your formula, it is just telling that there are blanks in the range, 0 means blank. the formula is treating the blank as a value and also considering it in the unique value calculations.



    If you want to remove 0 you can just insert an if over your formula to remove it. like



    =if(formula = 0, "", formula)


    or in orignal form



    =IF( (IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))=0,"",IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))


    or go in the cell formatting and change the format to display 0 as a dash.



    sometimes blank is also used as error checking, you can apply such formulae as well to check how many are blank, maybe that would someday be used to check any data entry problems.






    share|improve this answer



























      0














      there is no problem in your formula, it is just telling that there are blanks in the range, 0 means blank. the formula is treating the blank as a value and also considering it in the unique value calculations.



      If you want to remove 0 you can just insert an if over your formula to remove it. like



      =if(formula = 0, "", formula)


      or in orignal form



      =IF( (IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))=0,"",IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))


      or go in the cell formatting and change the format to display 0 as a dash.



      sometimes blank is also used as error checking, you can apply such formulae as well to check how many are blank, maybe that would someday be used to check any data entry problems.






      share|improve this answer

























        0












        0








        0







        there is no problem in your formula, it is just telling that there are blanks in the range, 0 means blank. the formula is treating the blank as a value and also considering it in the unique value calculations.



        If you want to remove 0 you can just insert an if over your formula to remove it. like



        =if(formula = 0, "", formula)


        or in orignal form



        =IF( (IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))=0,"",IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))


        or go in the cell formatting and change the format to display 0 as a dash.



        sometimes blank is also used as error checking, you can apply such formulae as well to check how many are blank, maybe that would someday be used to check any data entry problems.






        share|improve this answer













        there is no problem in your formula, it is just telling that there are blanks in the range, 0 means blank. the formula is treating the blank as a value and also considering it in the unique value calculations.



        If you want to remove 0 you can just insert an if over your formula to remove it. like



        =if(formula = 0, "", formula)


        or in orignal form



        =IF( (IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))=0,"",IFERROR(INDEX(Tabel15[Plant],MATCH(0,COUNTIF(Analyses!$Q$2:$Q2,Tabel15[Plant]),0)),""))


        or go in the cell formatting and change the format to display 0 as a dash.



        sometimes blank is also used as error checking, you can apply such formulae as well to check how many are blank, maybe that would someday be used to check any data entry problems.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 13:53









        usmanhaqusmanhaq

        1,113128




        1,113128



























            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%2f53276689%2fexcel-formula-unique-list-formula-not-working-if-counta-1%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

            Use pre created SQLite database for Android project in kotlin

            Darth Vader #20

            Ondo