Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4617502
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:08:00+00:00 2026-05-22T02:08:00+00:00

In Excel, if I enter the word PIZZA into a cell, select it, and

  • 0

In Excel, if I enter the word “PIZZA” into a cell, select it, and SHIFT+F7, I can get a nice English dictionary definition of my favorite food. Pretty cool.
But I’d like a function that does this. Something like ‘=DEFINE(“PIZZA”)’.

Is there a way through VBA scripts to access Microsoft’s Research data? I was considering using a JSON parser and a free online dictionary, but it seems like Excel has a nice dictionary built-in. Any ideas on how to access it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:08:00+00:00Added an answer on May 22, 2026 at 2:08 am

    In case VBA’s Research object doesn’t work out, you can try the Google Dictionary JSON method as so:

    First, add a reference to “Microsoft WinHTTP Services”.

    After you see my mad, JSON parsing skillz, you may also want to add your favorite VB JSON parser, like this one.

    Then Create the following Public Function:

    Function DefineWord(wordToDefine As String) As String
    
      ' Array to hold the response data.
        Dim d() As Byte
        Dim r As Research
    
    
        Dim myDefinition As String
        Dim PARSE_PASS_1 As String
        Dim PARSE_PASS_2 As String
        Dim PARSE_PASS_3 As String
        Dim END_OF_DEFINITION As String
    
        'These "constants" are for stripping out just the definitions from the JSON data
        PARSE_PASS_1 = Chr(34) & "webDefinitions" & Chr(34) & ":"
        PARSE_PASS_2 = Chr(34) & "entries" & Chr(34) & ":"
        PARSE_PASS_3 = "{" & Chr(34) & "type" & Chr(34) & ":" & Chr(34) & "text" & Chr(34) & "," & Chr(34) & "text" & Chr(34) & ":"
        END_OF_DEFINITION = "," & Chr(34) & "language" & Chr(34) & ":" & Chr(34) & "en" & Chr(34) & "}"
        Const SPLIT_DELIMITER = "|"
    
        ' Assemble an HTTP Request.
        Dim url As String
        Dim WinHttpReq As Variant
        Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
    
        'Get the definition from Google's online dictionary:
        url = "http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q=" & wordToDefine & "&sl=en&tl=en&restrict=pr%2Cde&client=te"
        WinHttpReq.Open "GET", url, False
    
        ' Send the HTTP Request.
        WinHttpReq.Send
    
        'Print status to the immediate window
        Debug.Print WinHttpReq.Status & " - " & WinHttpReq.StatusText
    
        'Get the defintion
        myDefinition = StrConv(WinHttpReq.ResponseBody, vbUnicode)
    
        'Get to the meat of the definition
        myDefinition = Mid$(myDefinition, InStr(1, myDefinition, PARSE_PASS_1, vbTextCompare))
        myDefinition = Mid$(myDefinition, InStr(1, myDefinition, PARSE_PASS_2, vbTextCompare))
        myDefinition = Replace(myDefinition, PARSE_PASS_3, SPLIT_DELIMITER)
    
        'Split what's left of the string into an array
        Dim definitionArray As Variant
        definitionArray = Split(myDefinition, SPLIT_DELIMITER)
        Dim temp As String
        Dim newDefinition As String
        Dim iCount As Integer
    
        'Loop through the array, remove unwanted characters and create a single string containing all the definitions
        For iCount = 1 To UBound(definitionArray) 'item 0 will not contain the definition
            temp = definitionArray(iCount)
            temp = Replace(temp, END_OF_DEFINITION, SPLIT_DELIMITER)
            temp = Replace(temp, "\x22", "")
            temp = Replace(temp, "\x27", "")
            temp = Replace(temp, Chr$(34), "")
            temp = iCount & ".  " & Trim(temp)
            newDefinition = newDefinition & Mid$(temp, 1, InStr(1, temp, SPLIT_DELIMITER) - 1) & vbLf  'Hmmmm....vbLf doesn't put a carriage return in the cell. Not sure what the deal is there.
        Next iCount
    
        'Put list of definitions in the Immeidate window
        Debug.Print newDefinition
    
        'Return the value
        DefineWord = newDefinition
    
    End Function
    

    After that, it’s just a matter of putting the function in your cell:

    =DefineWord(“lionize”)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try pasting =10**-2 into a cell in MS Excel. After pressing Enter, it turns
How to find enter and space in the excel cell value by uisng VBA.
I want user to enter only characters in excel cell.. i used ISTEXT(value) in
In Excel, there is a nice feature where if you enter 1, 2, 3
I am inserting text into a Memo field in a Excel cell via a
I like the Search And Replace Dialog of Excel 2010. I can enter data,
In excel 2007, I have a formula in a cell like the following: =COUNTIFS('2008-10-31'!$C:$C;>=&'$A7)
In Excel I have attached a picture to a cell using the following Sub
I'm going to build a wee batch search field where someone can enter/paste in
I have an excel list (excel 2003) where user enter translations for tokens. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.