How to select multiple strings based on multiple conditions using IF function in Excel





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















To make things easier, please see the below image first



1



I am trying to get the cell under Which Event? (H2 cell) to say which events they are invited to.




  • Suppose the person is only invited to Sanji, Wedding and Reception, then I want the formula to just show Sanji, Wedding & Reception(on the H2 cell) only if the value is >=1

  • If the value is 0 on Vesvaar and Sanji but is >=1 on Wedding and Reception, then I want it to only show Wedding & Reception

  • If the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then I want it to show Wedding only.


I hope I make sense?



I tried to use the following formula:



=IF((AND(D2>0,E2>0,F2>0,G2>0)),*All*,*Sanji, Wedding & Reception*)


Where if I put a 1 on Vesvaar, Sanji, Wedding, Reception, the cell H2 will change to All events. But if the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then it doesn't work.



I really hope I made sense and that you're able to help me?










share|improve this question

























  • Related:  Conditional concatenate cell content across rows & Generate a comma-separated list of cell contents, excluding blanks.

    – Scott
    Jan 30 at 17:09


















0















To make things easier, please see the below image first



1



I am trying to get the cell under Which Event? (H2 cell) to say which events they are invited to.




  • Suppose the person is only invited to Sanji, Wedding and Reception, then I want the formula to just show Sanji, Wedding & Reception(on the H2 cell) only if the value is >=1

  • If the value is 0 on Vesvaar and Sanji but is >=1 on Wedding and Reception, then I want it to only show Wedding & Reception

  • If the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then I want it to show Wedding only.


I hope I make sense?



I tried to use the following formula:



=IF((AND(D2>0,E2>0,F2>0,G2>0)),*All*,*Sanji, Wedding & Reception*)


Where if I put a 1 on Vesvaar, Sanji, Wedding, Reception, the cell H2 will change to All events. But if the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then it doesn't work.



I really hope I made sense and that you're able to help me?










share|improve this question

























  • Related:  Conditional concatenate cell content across rows & Generate a comma-separated list of cell contents, excluding blanks.

    – Scott
    Jan 30 at 17:09














0












0








0


0






To make things easier, please see the below image first



1



I am trying to get the cell under Which Event? (H2 cell) to say which events they are invited to.




  • Suppose the person is only invited to Sanji, Wedding and Reception, then I want the formula to just show Sanji, Wedding & Reception(on the H2 cell) only if the value is >=1

  • If the value is 0 on Vesvaar and Sanji but is >=1 on Wedding and Reception, then I want it to only show Wedding & Reception

  • If the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then I want it to show Wedding only.


I hope I make sense?



I tried to use the following formula:



=IF((AND(D2>0,E2>0,F2>0,G2>0)),*All*,*Sanji, Wedding & Reception*)


Where if I put a 1 on Vesvaar, Sanji, Wedding, Reception, the cell H2 will change to All events. But if the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then it doesn't work.



I really hope I made sense and that you're able to help me?










share|improve this question
















To make things easier, please see the below image first



1



I am trying to get the cell under Which Event? (H2 cell) to say which events they are invited to.




  • Suppose the person is only invited to Sanji, Wedding and Reception, then I want the formula to just show Sanji, Wedding & Reception(on the H2 cell) only if the value is >=1

  • If the value is 0 on Vesvaar and Sanji but is >=1 on Wedding and Reception, then I want it to only show Wedding & Reception

  • If the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then I want it to show Wedding only.


I hope I make sense?



I tried to use the following formula:



=IF((AND(D2>0,E2>0,F2>0,G2>0)),*All*,*Sanji, Wedding & Reception*)


Where if I put a 1 on Vesvaar, Sanji, Wedding, Reception, the cell H2 will change to All events. But if the value is 0 on Vesvaar, Sanji, Reception but it's >=1 on Wedding, then it doesn't work.



I really hope I made sense and that you're able to help me?







microsoft-excel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 1:40









phuclv

10.7k64297




10.7k64297










asked Jan 30 at 14:19









PratikPratik

72




72













  • Related:  Conditional concatenate cell content across rows & Generate a comma-separated list of cell contents, excluding blanks.

    – Scott
    Jan 30 at 17:09



















  • Related:  Conditional concatenate cell content across rows & Generate a comma-separated list of cell contents, excluding blanks.

    – Scott
    Jan 30 at 17:09

















Related:  Conditional concatenate cell content across rows & Generate a comma-separated list of cell contents, excluding blanks.

– Scott
Jan 30 at 17:09





Related:  Conditional concatenate cell content across rows & Generate a comma-separated list of cell contents, excluding blanks.

– Scott
Jan 30 at 17:09










2 Answers
2






active

oldest

votes


















0














An alternative way would be convert the list to binary and use VLOOKUP to find the events



=VLOOKUP((B2 > 0)*8 + (C2 > 0)*4 +(D2 > 0)*2 + (E2 > 0)*1, $H$2:$I$17, 2, FALSE)


The cell > 0 part produces a boolean value that would be converted to 0 or 1 in an arithmetic expression. The columns from left to right represent the digits from most to least significant



The lookup table can be stored anywhere, in some columns/rows faraway or in another sheet, and then you can also hide that sheet/rows/columns



Table



Here is the lookup table for the above



Number  Events
0 None
1 Reception
2 Wedding
3 Wedding, Reception
4 Sanji
5 Sanji, Reception
6 Sanji, Wedding
7 Sanji, Wedding, Reception
8 Vesvaar
9 Vesvaar, Reception
10 Vesvaar, Wedding
11 Vesvaar, Wedding, Reception
12 Vesvaar, Sanji
13 Vesvaar, Sanji, Reception
14 Vesvaar, Sanji, Wedding
15 All





share|improve this answer



















  • 2





    While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

    – Scott
    Jan 30 at 16:51



















2














IF You have Office 365 Excel you can use TEXTJOIN as an array formula:



=IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,"")))


It must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.



enter image description here



If not then you will need to concat the string on your own:



=IF(COUNTIF(D2:G2,">0")=4,"All",MID(IF(D2>0,","&$D$1,"")&IF(E2>0,","&$E$1,"")&IF(F2>0,","&$F$1,"")&IF(G2>0,","&$G$1,""),2,200))


enter image description here






share|improve this answer


























  • Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

    – Pratik
    Jan 30 at 15:14













  • Which formula did you try and what is it returning?

    – Scott Craner
    Jan 30 at 15:15











  • I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

    – Pratik
    Jan 30 at 15:20













  • Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

    – Scott Craner
    Jan 30 at 15:21






  • 2





    What error did you get? I am not downloading your file. I do not download files from unknown sources.

    – Scott Craner
    Jan 30 at 15:24












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1400101%2fhow-to-select-multiple-strings-based-on-multiple-conditions-using-if-function-in%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









0














An alternative way would be convert the list to binary and use VLOOKUP to find the events



=VLOOKUP((B2 > 0)*8 + (C2 > 0)*4 +(D2 > 0)*2 + (E2 > 0)*1, $H$2:$I$17, 2, FALSE)


The cell > 0 part produces a boolean value that would be converted to 0 or 1 in an arithmetic expression. The columns from left to right represent the digits from most to least significant



The lookup table can be stored anywhere, in some columns/rows faraway or in another sheet, and then you can also hide that sheet/rows/columns



Table



Here is the lookup table for the above



Number  Events
0 None
1 Reception
2 Wedding
3 Wedding, Reception
4 Sanji
5 Sanji, Reception
6 Sanji, Wedding
7 Sanji, Wedding, Reception
8 Vesvaar
9 Vesvaar, Reception
10 Vesvaar, Wedding
11 Vesvaar, Wedding, Reception
12 Vesvaar, Sanji
13 Vesvaar, Sanji, Reception
14 Vesvaar, Sanji, Wedding
15 All





share|improve this answer



















  • 2





    While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

    – Scott
    Jan 30 at 16:51
















0














An alternative way would be convert the list to binary and use VLOOKUP to find the events



=VLOOKUP((B2 > 0)*8 + (C2 > 0)*4 +(D2 > 0)*2 + (E2 > 0)*1, $H$2:$I$17, 2, FALSE)


The cell > 0 part produces a boolean value that would be converted to 0 or 1 in an arithmetic expression. The columns from left to right represent the digits from most to least significant



The lookup table can be stored anywhere, in some columns/rows faraway or in another sheet, and then you can also hide that sheet/rows/columns



Table



Here is the lookup table for the above



Number  Events
0 None
1 Reception
2 Wedding
3 Wedding, Reception
4 Sanji
5 Sanji, Reception
6 Sanji, Wedding
7 Sanji, Wedding, Reception
8 Vesvaar
9 Vesvaar, Reception
10 Vesvaar, Wedding
11 Vesvaar, Wedding, Reception
12 Vesvaar, Sanji
13 Vesvaar, Sanji, Reception
14 Vesvaar, Sanji, Wedding
15 All





share|improve this answer



















  • 2





    While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

    – Scott
    Jan 30 at 16:51














0












0








0







An alternative way would be convert the list to binary and use VLOOKUP to find the events



=VLOOKUP((B2 > 0)*8 + (C2 > 0)*4 +(D2 > 0)*2 + (E2 > 0)*1, $H$2:$I$17, 2, FALSE)


The cell > 0 part produces a boolean value that would be converted to 0 or 1 in an arithmetic expression. The columns from left to right represent the digits from most to least significant



The lookup table can be stored anywhere, in some columns/rows faraway or in another sheet, and then you can also hide that sheet/rows/columns



Table



Here is the lookup table for the above



Number  Events
0 None
1 Reception
2 Wedding
3 Wedding, Reception
4 Sanji
5 Sanji, Reception
6 Sanji, Wedding
7 Sanji, Wedding, Reception
8 Vesvaar
9 Vesvaar, Reception
10 Vesvaar, Wedding
11 Vesvaar, Wedding, Reception
12 Vesvaar, Sanji
13 Vesvaar, Sanji, Reception
14 Vesvaar, Sanji, Wedding
15 All





share|improve this answer













An alternative way would be convert the list to binary and use VLOOKUP to find the events



=VLOOKUP((B2 > 0)*8 + (C2 > 0)*4 +(D2 > 0)*2 + (E2 > 0)*1, $H$2:$I$17, 2, FALSE)


The cell > 0 part produces a boolean value that would be converted to 0 or 1 in an arithmetic expression. The columns from left to right represent the digits from most to least significant



The lookup table can be stored anywhere, in some columns/rows faraway or in another sheet, and then you can also hide that sheet/rows/columns



Table



Here is the lookup table for the above



Number  Events
0 None
1 Reception
2 Wedding
3 Wedding, Reception
4 Sanji
5 Sanji, Reception
6 Sanji, Wedding
7 Sanji, Wedding, Reception
8 Vesvaar
9 Vesvaar, Reception
10 Vesvaar, Wedding
11 Vesvaar, Wedding, Reception
12 Vesvaar, Sanji
13 Vesvaar, Sanji, Reception
14 Vesvaar, Sanji, Wedding
15 All






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 30 at 16:09









phuclvphuclv

10.7k64297




10.7k64297








  • 2





    While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

    – Scott
    Jan 30 at 16:51














  • 2





    While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

    – Scott
    Jan 30 at 16:51








2




2





While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

– Scott
Jan 30 at 16:51





While this approach is not scalable, it does offer the flexibility to generate the exact strings that the OP wants;  e.g., Wedding & Reception and Sanji, Wedding & Reception.

– Scott
Jan 30 at 16:51













2














IF You have Office 365 Excel you can use TEXTJOIN as an array formula:



=IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,"")))


It must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.



enter image description here



If not then you will need to concat the string on your own:



=IF(COUNTIF(D2:G2,">0")=4,"All",MID(IF(D2>0,","&$D$1,"")&IF(E2>0,","&$E$1,"")&IF(F2>0,","&$F$1,"")&IF(G2>0,","&$G$1,""),2,200))


enter image description here






share|improve this answer


























  • Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

    – Pratik
    Jan 30 at 15:14













  • Which formula did you try and what is it returning?

    – Scott Craner
    Jan 30 at 15:15











  • I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

    – Pratik
    Jan 30 at 15:20













  • Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

    – Scott Craner
    Jan 30 at 15:21






  • 2





    What error did you get? I am not downloading your file. I do not download files from unknown sources.

    – Scott Craner
    Jan 30 at 15:24
















2














IF You have Office 365 Excel you can use TEXTJOIN as an array formula:



=IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,"")))


It must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.



enter image description here



If not then you will need to concat the string on your own:



=IF(COUNTIF(D2:G2,">0")=4,"All",MID(IF(D2>0,","&$D$1,"")&IF(E2>0,","&$E$1,"")&IF(F2>0,","&$F$1,"")&IF(G2>0,","&$G$1,""),2,200))


enter image description here






share|improve this answer


























  • Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

    – Pratik
    Jan 30 at 15:14













  • Which formula did you try and what is it returning?

    – Scott Craner
    Jan 30 at 15:15











  • I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

    – Pratik
    Jan 30 at 15:20













  • Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

    – Scott Craner
    Jan 30 at 15:21






  • 2





    What error did you get? I am not downloading your file. I do not download files from unknown sources.

    – Scott Craner
    Jan 30 at 15:24














2












2








2







IF You have Office 365 Excel you can use TEXTJOIN as an array formula:



=IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,"")))


It must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.



enter image description here



If not then you will need to concat the string on your own:



=IF(COUNTIF(D2:G2,">0")=4,"All",MID(IF(D2>0,","&$D$1,"")&IF(E2>0,","&$E$1,"")&IF(F2>0,","&$F$1,"")&IF(G2>0,","&$G$1,""),2,200))


enter image description here






share|improve this answer















IF You have Office 365 Excel you can use TEXTJOIN as an array formula:



=IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,"")))


It must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.



enter image description here



If not then you will need to concat the string on your own:



=IF(COUNTIF(D2:G2,">0")=4,"All",MID(IF(D2>0,","&$D$1,"")&IF(E2>0,","&$E$1,"")&IF(F2>0,","&$F$1,"")&IF(G2>0,","&$G$1,""),2,200))


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 30 at 15:29

























answered Jan 30 at 14:24









Scott CranerScott Craner

12.6k11318




12.6k11318













  • Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

    – Pratik
    Jan 30 at 15:14













  • Which formula did you try and what is it returning?

    – Scott Craner
    Jan 30 at 15:15











  • I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

    – Pratik
    Jan 30 at 15:20













  • Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

    – Scott Craner
    Jan 30 at 15:21






  • 2





    What error did you get? I am not downloading your file. I do not download files from unknown sources.

    – Scott Craner
    Jan 30 at 15:24



















  • Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

    – Pratik
    Jan 30 at 15:14













  • Which formula did you try and what is it returning?

    – Scott Craner
    Jan 30 at 15:15











  • I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

    – Pratik
    Jan 30 at 15:20













  • Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

    – Scott Craner
    Jan 30 at 15:21






  • 2





    What error did you get? I am not downloading your file. I do not download files from unknown sources.

    – Scott Craner
    Jan 30 at 15:24

















Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

– Pratik
Jan 30 at 15:14







Hello Scott. Many thanks for your quick reply. I tried to add the formula but it still doesn't work like I want to. I have attached the excel sheet to the original post to see make it easier to see what has been done. I am still a beginner in Excel so apologies if I am not being clear enough. 1drv.ms/x/s!Aojtb-lU1PMexWhY7J8C2lHR-n0u

– Pratik
Jan 30 at 15:14















Which formula did you try and what is it returning?

– Scott Craner
Jan 30 at 15:15





Which formula did you try and what is it returning?

– Scott Craner
Jan 30 at 15:15













I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

– Pratik
Jan 30 at 15:20







I tried this one =IF(COUNTIF(D2:G2,">0")=4,"All",TEXTJOIN(",",TRUE,IF(D2:G2>0,$D$1:$G$1,""))). It returned with "All" if I kept 1 on "Vesvaar", "Sanji", "Wedding" & "Reception". But if I kept 0 on "Vesvaar", "Sanji", "Reception" but I kept "1" in "Wedding", it returned with #VALUE!

– Pratik
Jan 30 at 15:20















Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

– Scott Craner
Jan 30 at 15:21





Are you using Office 365 Excel? Did you confirm with Ctrl-Shift-Enter instead of Enter when exiting edit mode?

– Scott Craner
Jan 30 at 15:21




2




2





What error did you get? I am not downloading your file. I do not download files from unknown sources.

– Scott Craner
Jan 30 at 15:24





What error did you get? I am not downloading your file. I do not download files from unknown sources.

– Scott Craner
Jan 30 at 15:24


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • 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%2fsuperuser.com%2fquestions%2f1400101%2fhow-to-select-multiple-strings-based-on-multiple-conditions-using-if-function-in%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

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?