Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 930665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:22:27+00:00 2026-05-15T20:22:27+00:00

I have a grid something like this: A A A A A B C

  • 0

I have a grid something like this:

  A A A A A
B C C C C C
B C C C C C
B C C C C C
B C C C C C
B C C C C C

Each A and B are numeric values derived from creating a bit array from some other work going on elsewhere in the worksheets.

In C, I need to perform a bitwise AND on the intersecting A and B and test if the result is greater than zero (i.e., there’s at least one matching bit value of “1”).

This must be a pure Excel formula, can’t use macros–it is used in a conditional format. Using macros to simulate conditional formatting is not an option, nor is creating a table that duplicates C and uses a macro to store the answer that the conditional formatting can look at.

The values for A and B could be stored as a string with 1’s and 0’s if some string magic is easier to perform.

Any ideas?

edit

The accepted answer gives me what I need, but for posterity, here’s how to extend it to extend that solution to give bitwise answers back:

AND = SUBSTITUTE(SUBSTITUTE(TEXT(VALUE($A2)+VALUE(B$1),"1","0"),"2","1")
OR = SUBSTITUTE(TEXT(VALUE($A2)+VALUE(B$1),"2","1")
XOR = SUBSTITUTE(TEXT(VALUE($A2)+VALUE(B$1),"2","0")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:22:28+00:00Added an answer on May 15, 2026 at 8:22 pm

    save it as a string of 0 and 1, add them as numbers together, convert that to string and look for a 2.

    =ISNUMBER(SEARCH("2",TEXT(VALUE($A2)+VALUE(B$1),"0")))
    

    copy in cell B2 with data in A2 and B1, then copy&paste around.

    edit: Wow! they have put in a function DEC2BIN()!

    =ISNUMBER(SEARCH("2",TEXT(VALUE(DEC2BIN($A2))+VALUE(DEC2BIN(B$1)),"0")))
    

    and leave them numbers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.