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)
)