How To Perform Sentiment Analysis Using Excel (No Coding)

Sentiment Analysis Using Excel

Sentiment analysis is the act of determining the emotion behind a text, by doing so we can decide whether the data we retrieved are majority negative or positive sentiment.

This can be extremely useful for analyzing the community sentiment on product reviews, forums, stock sentiment via news, you name it.

In this tutorial, we will show you how to analyze Twitter data sentiment using Excel through the use of “Azure Machine Learning” without the need for coding.

Want to Learn Spreadsheets?
Learn by DOING on our online interactive platform!

How Does Sentiment Analysis Work?

Sentiment analysis works through the use of Natural Language Processing (NLP) a subset of Artificial intelligence (AI).

Basically, it detects whether a text is positive, negative, or neutral from being trained on a large dataset by breaking down a piece of text into topic categories and assigning a score to each category.

And through its gained knowledge it is able to classify similar texts to determine their sentiment.

Normally to perform sentiment analysis we would need to use some sort of programming language for example python programming. But in our case, we will be using an addon called “Azure Machine Learning”.

Azure machine learning is a cloud-based service that does all our grunt work for us.

Although Azure Machine Learning is not perfect and probably not as “great” compared to using a programming language, it does work well in quickly classifying text and determining its sentiment, which means it is super beginner-friendly.

Download Azure Machine Learning Addon in Excel

To get started we need to download our add-in.

To download Azure Machine Learning we firstly need to open our Excel sheet and click on:

Insert > Add-ins > Get Add-ins

Sentiment Analysis using excel

Next, we can search for “Azure” on our search bar and add the “Azure Machine Learning” by clicking on “Continue”.

Download and Import our dataset

The next option is to download and import our dataset to Excel. The data I will be using is “Twitter US Airline Sentiment” from Kaggle.

You can download it on their website here: https://www.kaggle.com/crowdflower/twitter-airline-sentiment

If that link doesn’t work, it can be downloaded straight from our website:

Basically, this dataset contains data of individuals that tweeted about American airlines. In each individual tweet, we can use it to classify whether it is negative or positive sentiment.

As shown in the excel spreadsheet below, the two columns I will be using are “airline sentiment” where the data has already been classified, and “text” which is the tweet itself.

We will be classifying the “text” column and comparing the answer to our “airline_sentiment” column.

Sentiment analysis using excel

Setup Azure Machine Learning

Now that we have our data and Azure machine learning downloaded, we now need to set up Azure machine learning so that it can properly analyze our text.

To use our addon we can click on:

Insert > My Add-ins > Azure Machine Learning > Text Sentiment Analysis (Excel add-in)

Downloading Azure machine learning

Next, we need to change the column name of our input text. As shown by Azure Machine Learning Schema, they require the column name to be specifically “tweet_text”, anything different will cause an error.

Changing columns in azure machine learning

Afterward, we need to input our data column on the input cell. In my case, it will be “Tweets!B1:B14641”. Similarly, for our output cell where Azure Machine learning outputs its classification of our data, it will be “Tweets!C1”.

Analyze our Output

Once the output has been generated, the score was changed from a decimal format to a percentage format.

Basically, the score level of each tweet is viewed as a “confidence level” which means the closer the score is towards 100% it is high confidence that the tweet is positive, the lower it is to the negative level the higher chance it is negative and middle which is neutral.

Sort from positive sentiment only

Sorting for positive values only is a great way to identify the most positive views. This can be useful for identifying positive product reviews.

To short for positives only you can click on:

Data > Sort from largest to smallest button

Sort from negative sentiment only

Sorting by negative sentiment only can help with identifying the underlying issues that clients may have with your products.

Similarly to sort for negative values only you can click on:

Data > Sort from smallest to largest button

Calculating the accuracy of the classifications

To determine the accuracy of our classifications we can use a pivot table, which is a function that excel provides to summarize large amounts of data.

Basically, we are summing and counting the unique values (positive, negative, and neural) provided in our airline_sentiment column which is the correctly classified tweet data, and comparing it to azure machine learning classified data on the sentiment column.

To input a pivot table you can follow the following steps:

Insert > Pivot table > Enter the Value in Table/Range > Enter Location of Pivot Table

Afterward, we need to click on our output pivot table and tick on the input box and drag the data column input value to the Values box at the bottom right.

By doing so Excel automatically creates the count of unique values within the airline_sentiment column and outputs the selected values.

This process was repeated again for the “sentiment” column.
By doing so, we have two unique pivot tables.

One which is for our classified values from Kaggle and the other our Azure machine learning predicted. I have done some basic maths and concluded that Azure machine learning has unclassified both negative and natural values and over-classified positive values.


In this tutorial, we were able to classify tweet data from Kaggle using azure machine learning which allowed us to determine the sentiment of each individual tweet.

Although Azure machine learning is not perfect and not as great compared to using programming language to determine sentiment text data, we were able to correctly classify values that were better than random sampling (greater than 50%).

Therefore azure machine learning is a great beginner-friendly way to conduct sentiment analysis using a spreadsheet in excel.

Can Excel do sentiment analysis?

Yes, excel offers the ability to conduct sentiment analysis by using the addon “Azure Machine Learning”.

How to analyze sentiment in Excel?

You can analyze sentiment in Excel by using an addon called “Azure Machine Learning”. This addon does all the grunt work for you and rates sentiment on a negative, neutral and positive scale.