Using SQL IN Function in Excel

0 votes

Is there an "IN" type function like the one used in sql that can be used in excel? For example, if i am writing an If statement in excel and I want it to check the contents of a cell for 5 different words can i write something like:

=If(A1=IN("word1","word2","word3","word4","word5"),"YES","NO")

Mar 31, 2022 in Database by Edureka
• 13,690 points
544 views

1 answer to this question.

0 votes
MATCH is a word that can be used in a variety of ways.

=MATCH(A1, "word1,"word2,"word3,"word4","word5", 0) returns the index of the corresponding item in the array list. The trailing 0 indicates that the match should be exact. If it isn't present, it will return #N/A, so you can add an IF(ISNA(to the front to make it behave like your "IN":

=IF(MATCH(A1, "word1,"word2,"word3,"word4","word5", 0),"NO","YES"), "NO","YES")
The order of the "YES" and "NO" has changed.
answered Apr 4, 2022 by Edureka
• 13,690 points

Related Questions In Database

0 votes
1 answer

How can we achieve excel ceiling function with significance value in SQL Server

If the underlying data types and rounding ...READ MORE

answered Apr 4, 2022 in Database by gaurav
• 23,260 points
903 views
0 votes
1 answer

STUFF and REPLACE function in SQL

STUFF Function: This function is used to ...READ MORE

answered Sep 28, 2018 in Database by DataKing99
• 8,250 points
1,580 views
0 votes
1 answer

Convert Rows to columns using 'Pivot' in SQL Server

You can use the PIVOT function to ...READ MORE

answered Feb 8, 2022 in Database by Vaani
• 7,070 points
1,563 views
0 votes
1 answer

How to rename a column in a database table using SQL?

For SQL Server, use sp_rename USE AdventureWorks; GO EXEC sp_rename 'Customers.CustomerTerritory.TerritoryID', ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,060 points
718 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
1,108 views
0 votes
1 answer

ImportError: openpyxl is required for loading excel format files

Forget the PsychoPy complications for the time ...READ MORE

answered Oct 3, 2018 in Python by Priyaj
• 58,100 points
1,027 views
0 votes
1 answer

In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

answered Oct 15, 2018 in RPA by Priyaj
• 58,100 points
4,310 views
0 votes
1 answer

Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE

answered Oct 22, 2018 in Power BI by Annie97
• 2,160 points
4,185 views
0 votes
1 answer

Save dynamically created table content in excel file using SheetJS

text inside tr instead of td in dynamic content. This results ...READ MORE

answered Apr 4, 2022 in Database by Edureka
• 13,690 points
3,556 views
0 votes
1 answer

How to download created excel file in node.js using exceljs

Download a sample Excel file using Node. ...READ MORE

answered Apr 4, 2022 in Database by Edureka
• 13,690 points
7,724 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