Forum Discussion
anupambit1797
Mar 24, 2023Iron Contributor
BITPOSITION
Dear Experts,
Could you please share the formula, on how to Extract the Bit-position of k0,k1,k2,k3 in below excel.
Thanks in Advance,
Br,
Anupam
- Patrick2788Silver Contributor
First, I converted your DEC2BIT result to an array with:
=1*MID(B2,SEQUENCE(,LEN(B2)),1)
Then the formula for bit position:
=LET(filtered,FILTER(BITPosition,C2#<>0),r,COLUMNS(filtered),INDEX(filtered,,SEQUENCE(,r,4,-1)))
- OliverScheurichGold Contributor
=INDEX($C$1:$J$1,LARGE(IF($C$2:$J$2=1,COLUMN($C$2:$J$2)),COLUMN(A$1))-2)
You can try this formula. Enter the formula with ctrl+shift+enter as an arrayformula if you don't work with Office365 or Excel 2021.
- anupambit1797Iron ContributorCan we use OFFSET function or any BIT operation as well ?
Br,
Anupam
- HecatonchireIron Contributor