Forum Discussion

zlebow380's avatar
zlebow380
Copper Contributor
Aug 15, 2023

Trying to use AND formula and TEXTJOIN IF - Not Working

I am trying to return multiple values from a table based on two different conditions. In my current formula below it is giving me the return of C5 (month) and C6 (sport), but I want it to return the values that fit C5 and C6 together (only the chosen sports in the chosen month). Any help would be greatly appreciated! 

 

=TEXTJOIN(" , ",TRUE,IF(C5=Sports!B9:B56,Sports!A9:A56,""),IF(C6=Sports!G2:G80,Sports!A2:A56,""))

9 Replies

  • zlebow380 

    For that to work, he ranges should be the same size, so perhaps

     

    =TEXTJOIN(" , ", TRUE, IF((C5=Sports!B2:B80)*(C6=Sports!G2:G80), Sports!A2:A80, "")

    • zlebow380's avatar
      zlebow380
      Copper Contributor
      hmm that doesnt seem to work. its just returning a blank cell
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        zlebow380 

        Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?

Resources