Forum Discussion
LauraJackson
Jun 15, 2023Copper Contributor
Help with Excel formula
Hi everyone, I have a formula in P2 that looks to see what is in F2. If F2 says "Full CPL", then put "Full" in P2. If it does not, then take the column header names from columns H through N and sepa...
- Jun 15, 2023
Try this one:
=LET( swap, SWITCH(size, "2XL", "3XL", size), filtered, UNIQUE(FILTER(swap, E2:J2 = "true"), 1), TEXTJOIN(", ", 1, filtered) )
LauraJackson
Jun 15, 2023Copper Contributor
Shoot I clicked the wrong button. Sorry, I did not mean to mark as best response as I am still testing.
Patrick it seems to be doing what I need, but how do I incorporate that into my existing formula? I need to make sure it still looks at F2 first. Thanks!
Patrick it seems to be doing what I need, but how do I incorporate that into my existing formula? I need to make sure it still looks at F2 first. Thanks!
Patrick2788
Jun 15, 2023Silver Contributor
For your sheet it'd be:
=LET(
size, $H$1:$N$1,
swap, SWITCH(size, "2XL", "3XL", size),
filtered, UNIQUE(FILTER(swap, H2:N2 = "true"), 1),
join, TEXTJOIN(", ", 1, filtered),
IF(F2 = "Full CPL", "Full", join)
)- LauraJacksonJun 20, 2023Copper Contributor
Patrick2788 Hi Patrick, thanks a lot for your help so far. I am finding that when column F does not equal Full CPL I am receiving a #CALC! error. Any suggestions? Thank you.
- Patrick2788Jun 20, 2023Silver ContributorIt could be an issue with the way "true" is listed in your sheet. Is it text "true" or a logical TRUE.
- LauraJacksonJun 20, 2023Copper ContributorHi Patrick, they are all text "true".