Excel like a finance pro.
← The libraryPractice · 2 questions →
Engineering function
BITAND
Returns the bitwise AND of two numbers.
Rarely usedDifficulty 1350 · AdvancedUsage rank #420 of 520
When to use it
Bitwise AND of two non-negative integers: a bit is set only where both inputs have it. Testing flags.
The shape of it
- Syntax
=BITAND(number1, number2)
Worked examples
Simple
=BITAND(1,5) → 1
001 AND 101.
Two bytes
=BITAND(13,25) → 9
01101 AND 11001 is 01001.
Test a flag
=BITAND(A2,4)>0 → TRUE
Is bit 3 (value 4) set in A2 = 6? 110 AND 100 is 100.
Worth knowing
- Flag n is set when BITAND(value,2^(n-1))>0.
- Inputs must be below 2^48.
- DEC2BIN shows the bits while debugging.
Where it goes wrong
- #NUM! for negatives, non-integers, or values 2^48 and above.
- #VALUE! for text.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.