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
• 12,240 points
15 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
• 20,880 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
4,889 views
0 votes
0 answers

How can I convert excel to PDF by Libreoffice and keep all format from excel file?

I can currently convert Excel to PDF ...READ MORE

3 hours ago in Others by Kithuzzz
• 12,240 points
2 views
0 votes
1 answer

Change date format of cell in excel from dd.mm.yyyy to yyy/mm/dd ( excel version 2013 )

Hello :)   Excel’s Format Cells function can quickly ...READ MORE

answered Feb 9 in Others by gaurav
• 18,960 points
337 views
0 votes
1 answer

How to import data from a HTML table on a website to excel?

Hello  To import any HTML file in excel there ...READ MORE

answered Feb 10 in Others by gaurav
• 18,960 points
117 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
71 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
114 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
62 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
• 18,960 points
39 views
0 votes
1 answer

Unable to import data in excel from another website using VB code

Replace : Set ieTable = ieDoc.all.Item("report-table") With: Set ieTable = ...READ MORE

answered Sep 21 in Others by narikkadan
• 20,880 points
17 views
0 votes
1 answer
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