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, 2022 in Others by Kithuzzz
• 38,010 points
594 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, 2022 by narikkadan
• 63,420 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, 2022 in Others by Edureka
• 13,670 points
13,292 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, 2022 in Others by narikkadan
• 63,420 points
457 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 Nov 26, 2022 in Others by narikkadan
• 63,420 points
568 views
0 votes
0 answers

VBA SQL Connection to Excel from Word returns no records

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

Nov 27, 2022 in Others by Kithuzzz
• 38,010 points
419 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, 2022 in Others by Edureka
• 13,670 points
1,237 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, 2022 in Others by Edureka
• 13,670 points
1,424 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, 2022 in Others by Edureka
• 13,670 points
697 views
0 votes
1 answer

IF - ELSE IF - ELSE Structure in Excel

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

answered Feb 18, 2022 in Others by gaurav
• 23,260 points
2,331 views
0 votes
1 answer

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

"Times New Roman" typeface does not have ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,420 points
1,269 views
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, 2022 in Others by narikkadan
• 63,420 points
595 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