Close this search box.

All articles with 'XOR' Tag

Check for two out of three conditions (Homework)

Published on Jan 13, 2017 in Excel Challenges
Check for two out of three conditions (Homework)

Time for some logic check.

Suppose, you have three logic values in A1:C1 (TRUE or FALSE values in each cell)

You need to find out if ONLY two of these values are TRUE.

How would you write the formula?

Got an answer? Awesome. Just post your formula in the comments. Let’s see how much variety we can get from all of our readers.

Continue »

CP028: How to tell business logic & rules to Excel?

Published on Jan 22, 2015 in Chandoo.org Podcast Sessions, Random
CP028: How to tell business logic & rules to Excel?

In the 28th session of Chandoo.org podcast, let’s figure out how to express business rules & logic to Excel.

What is in this session?

What good are spreadsheets if they can’t solve business problems?

But we all struggle when it comes to modeling real world business conditions in Excel. For example, if you have below business rule to decide how much discount to offer a customer,

  • If the customer bought 3 or more times previously and offer 15% discount
  • If the customer bought 1 or 2 times previously AND customer’s age is >40, offer 10% discount
  • If the customer visited our New York store between 6PM-9PM offer 5% discount
  • Else no discount

How would you go about modeling these in Excel?

That is our topic for this podcast session.

In this podcast, you will learn

  • The challenge of modeling business logic & rules in Excel
  • My struggles with such formulas in early days
  • 4 features of Excel that can help you with this.
  • Example business rules & how to write formulas
Continue »

Get busy this weekend, with OR XOR AND [Excel Homework]

Published on Jul 29, 2011 in Excel Challenges, Excel Howtos
Get busy this weekend, with OR XOR AND [Excel Homework]

Some of you have heard my neighbor’s dog bark in a video or two that I recorded. While I was busy explaining how to do something awesome in Excel, this dog would decide to bark, adding her own two cents to the lesson. Quite a few of my VBA class students have grown used to it. So much that they complain when a lesson doesn’t have a couple of woofs. But I digress.

So coming back, one of the dogs (probably stray) has decided that she should bring her infant puppies and hide them under our terrace stair case. So, now we have 2 cute little puppies barking day long (and very late in to the night) just outside my office window. We have tried hard to get rid of them, but they somehow sneak back in and start barking or crying. So, I will be busy this weekend trying to move them out.

But that doesn’t mean, you have to live Excel-less for a few days. So I have a homework.

OR XOR AND, Get busy this weekend!

Don’t worry. I am not speaking elvish or something. OR, XOR & AND stand for bit-wise operations. This week, your task is to write formulas in Excel that would get the bit-wise results for AND, OR & XOR.

Continue »

How to Get “Either-Or” Condition in Data Validation?

Published on May 4, 2010 in Learn Excel
How to Get “Either-Or” Condition in Data Validation?

In a recent consulting assignment I had a tricky data validation problem. The customer wanted to have an either-or condition in the data validation, like this: My initial reaction to this requirement was “hmm… that is not possible“. But before shooting the email back to client, I got curious and checked if excel data validation […]

Continue »

Writing “Either Or” formula in Excel [Formula Howtos]

Published on Mar 2, 2010 in Excel Howtos, Learn Excel

We all know the AND, OR & NOT formulas in Excel using which you can perform simple logical operations And, Or & Negate. But what if you are the chief of HR at ACME Company, where they have a strange rule on extra allowance like this: Now, to calculate the dates in a month that […]

Continue »