Home > OS >  How do I get the count of values from a geometric sequence that fits in a number
How do I get the count of values from a geometric sequence that fits in a number

Time:09-06

I'm not even sure how to explain what I am looking for, but I will give it a try. The image below shows a geometric sequence in column "LIST" I'd like to get the count of values of numbers of column "LIST" from for the numbers in column "TEST" in column "NBR"

e.g. The value 116 is a combination of the numbers 64,32,16 and 4, hence the outcome should be 4 (because it takes 4 values to get to 116) in column "NBR"

enter image description here

Can this be done with a excel formula?

CodePudding user response:

As per @HighPerformanceMark, you seem to want to convert a decimal to a binary number to count how many 1s are used. You can use the DEC2BIN() function for this which accepts positive decimals upto 511:

=LEN(SUBSTITUTE(DEC2BIN(B2),0,""))
  • Related