How to Convert Qualitative Data to Quantitative Data in Excel

In the following dataset, we have qualitative data for two questions from a survey about people’s preferences in movies. We will convert this qualitative data to quantitative data.

3 Easy Methods to Convert Qualitative Data to Quantitative Data in Excel


Method 1 – Use the Excel Find and Replace Options to Convert Qualitative Data to Quantitative Data

Steps:

  • Go to the Home tab.

Use Excel Find and Replace Options to Convert Qualitative Data to Quantitative Data

  • Select Replace from the Find and Replace option of the ribbon.

Use Excel Find and Replace Options to Convert Qualitative Data to Quantitative Data

  • A new dialogue box named Find and Replace will appear.
  • Type Yes in the Find what field.
  • Type 1 in the Replace with field.
  • Click on the Replace All button.

Use Excel Find and Replace Options to Convert Qualitative Data to Quantitative Data

  • Here’s the result of the first change.

Use Excel Find and Replace Options to Convert Qualitative Data to Quantitative Data

  • Type No in the Find what field and type 2 in the Replace with field, then click Replace All.

  • The qualitative value No converts into quantitative value 2.

  • Similarly, put 3, 4, 5, and 6 in the Replace with field for the values Occasionally, Thriller, Comedy, and SciFi, respectively, in the Find what field, and apply Replace All.
  • Here’s the final result.

Read More: How to Analyse Qualitative Data from a Questionnaire in Excel


Method 2 – Convert Qualitative Data to Quantitative Data with a Nested IF Formula

We’ll use the same starting dataset and make a new table in the G:I range to put the new data.

Convert Qualitative Data to Quantitative Data with Excel Nested IF Formula

Steps:

  • Select cell H5.
  • Use the following formula in that cell:
=IF(C5="Yes",1,IF(C5="NO",2,IF(C5="Occasionally",3,0)))
  • Press Enter.
  • In cell H5, we get the value 1.

Convert Qualitative Data to Quantitative Data with Excel Nested IF Formula

  • Drag the Fill Handle tool from cell H5 to H10.
  • Here’s the result.

Convert Qualitative Data to Quantitative Data with Excel Nested IF Formula

  • Select cell I5.
  • Insert the following formula in that cell:
=IF(D5="Thriller",4,IF(D5="Comedy",5,IF(D5="Sci-Fi",6,0)))
  • Hit Enter.
  • We get the value 4 in cell I5.

  • Drag the Fill Handle from cell I5 to I10.
  • Here are the results.

Read More: How to Analyze Qualitative Data in Excel


Method 3 – Apply VBA to Convert Qualitative Data to Quantitative Data in Excel

Steps:

Apply VBA to Convert Qualitative Data to Quantitative Data in Excel

  • A new VBA window will appear.
  • Right-click on Sheet4 (VBA).
  • Select Insert and Module.

Apply VBA to Convert Qualitative Data to Quantitative Data in Excel

  • This will open a blank VBA code window.
  • Use the following code in that blank code window:
Sub Use_VBA()
Range("B4:D10").Replace What:="Yes", Replacement:="1", MatchCase:=True
End Sub
  • Click on the Run button.

Apply VBA to Convert Qualitative Data to Quantitative Data in Excel

  • This will replace Yes with 1.
  • We can see the result in the following image.

  • In the VBA code, type 2, 3, 4, 5, and 6 in the ‘Replace with’ field for the values No, Occasionally, Thriller, Comedy, and SciFi in the ‘Find what’ field.

Read More: How to Analyze Quantitative Data in Excel 


Download the Practice Workbook


Related Articles


<< Go Back to Data Analysis with Excel Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mukesh Dipto
Mukesh Dipto

Mukesh Dipto is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including Rhino3D, Maxsurf C++, AutoCAD, HTML, CSS, JavaScript, and WordPress. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo