Excel formula unique list formula not working, if counta = 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.
excel excel-formula
add a comment |
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
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
add a comment |
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
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
excel excel-formula
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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.
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]),"")
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
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
add a comment |
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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]),"")
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
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
add a comment |
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.
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]),"")
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
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
add a comment |
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.
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]),"")
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
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.
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]),"")
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
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 13 '18 at 13:53
usmanhaqusmanhaq
1,113128
1,113128
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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