Convert CASE WHEN logic from SQL to EXCEL

0 votes

I have a SQL query to determine whether a record is from a particular data company or not.

The SQL code -

CASE WHEN COL_Category in ('A',B')
OR (COL_Name like  '%Apple%)
OR (COL_Name like  '%Ball%)
THEN 'YES'
ELSE 'NO'

And I am trying to get the logic to work in excel for the column "Yes/No?"

COL_Category
COL_Name
Yes/No?
A
Apple
Yes
B
Cat
Yes
C
Dog
No
C
Apple
Yes
D
Cat
No
Sep 20 in Others by Kithuzzz
• 20,660 points
50 views

1 answer to this question.

0 votes

A combination of IF(), ISNUMBER(SEARCH()), and OR() can be used to achieve the result.

Find the screenshot here.

answered Sep 21 by narikkadan
• 37,660 points

Related Questions In Others

0 votes
1 answer

How to convert data from txt files to Excel files using python

Hi , there are few steps to ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
6,063 views
0 votes
1 answer

Hyperlink changes from # to %20-%20 when clicked in Excel

This is a known issue with MS Excel. Basically, ...READ MORE

answered Nov 19 in Others by narikkadan
• 37,660 points
12 views
0 votes
1 answer

How to convert an excel formula to SQL to calculate daily compound interest

Here is a solution that is effective. ...READ MORE

answered 2 days ago in Others by narikkadan
• 37,660 points
12 views
0 votes
0 answers

VBA SQL Connection to Excel from Word returns no records

Trying to figure out how to read ...READ MORE

1 day ago in Others by Kithuzzz
• 20,660 points
7 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hello, yes u can find your birthdate using ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
139 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
233 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17 in Others by Edureka
• 13,640 points
102 views
0 votes
1 answer

IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE

answered Feb 18 in Others by gaurav
• 22,040 points
69 views
0 votes
1 answer
0 votes
1 answer

Excel Formula to convert from cm to inches and feet & round off to two digits

Use the TEXT function to format, and ...READ MORE

answered Oct 15 in Others by narikkadan
• 37,660 points
37 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP