Forum Discussion
rcklein2
Oct 25, 2021Copper Contributor
Writing an IF function with multiple values in one cell
Hello, This is my first post here. Please let me know if this is correct! Device: PC/Windows 10 Pro 64-bit (Version 21H1 Build 19043) Excel version: Microsoft® Excel® for Microsoft 365 MS...
- Oct 25, 2021
In B2:
=IF($A2="","",--ISNUMBER(FIND(","&COLUMN()-1&",",","&$A2&",")))
Fill to the right, then down (or vice versa) as far as needed.
See the attached version.
rcklein2
Oct 26, 2021Copper Contributor
Hi Sergei! Thanks so much. Your formula currently fills in any blank cells with "1." I do need to keep these cells blank. Is there a way to do this using your formula?
SergeiBaklan
Oct 26, 2021Diamond Contributor
Formulas in Excel do not return blank as a value, you may return empty string instead or any other symbols here
For example
=LET(
n, MID( A10, SEQUENCE(, LEN(A10)),1 ),
j, --FILTER(n, n<>","),
IF( ISNA( XMATCH( SEQUENCE(,7),j )), "", 1)
)