Looks like you need to add a few things.
1) a variable for your text entry to pass to your function
2) the function to be able to accept a passed parameter and button since its now passing a parameter should utilize lambda. help understanding lambda here.
Why are Python lambdas useful?
3) routine to look up value in excel file within your function, I use openpyxl or xlwings typically and have included a working code for openpyxl, I also included what I think xlrd's should be, but don't have that on the cpu i'm at currently on to verify, here's a couple links to do nearly what you want in xlrd module.
Iterating all columns with xlrd
Iterating rows and columns using XLRD in Python
import tkinter as tk
from tkinter.messagebox import showinfo
import openpyxl as opxl
def popupmsg(msg):
#output to user
title = "Full name"
msg = msg
showinfo(title, msg)
#3)lookup function
def lookUp(a):
abbreviation = str(a)
wb = opxl.load_workbook('example.xlsx')
#if excel is not inside same folder as this routine include path to it
sheet= wb['main']
#named the sheet 'main' in case I need more
for col_cells in sheet.iter_cols(min_col = 1 , max_col =1):
for cell in col_cells:
if (cell.value == abbreviation):
rowN = cell.row
fullName = str(sheet.cell(row = rowN, column = 2).value)
popupmsg(fullName) #this will output every match
#with input Initials
else:
pass
# #3)here's what I think should be the xlrd equivalent
# import xlrd # replace opxl at top, comment out opxl routine
# file_location = "example.xlsx"
# workbook = xlrd.open_workbook(file_location)
# sheet = workbook.sheet_by_index(0)
# for cell in sheet.col(0)):
# if (cell.value == abbreviation):
# rowN = cell.row
# fullName = sheet.cell_value(rowN,1)
# else:
# pass
popupmsg(fullName) #this will output the last output with input Initials
root=tk.Tk()
#txtvar 1)
abb = tk.StringVar()
abbLabel = tk.Label(root, text= "Insert the abbreviation")
abbEntry = tk.Entry(root, textvariable = abb)
#lambda 2)
lookupBtn = tk.Button(root, text= "Look Up Name", command = lambda:
lookUp(abbEntry.get()))
abbLabel.pack()
abbEntry.pack(padx = 20)
lookupBtn.pack()
#more complicated forms may want to use grid
root.mainloop()
I also highly recommend adopting the object oriented structure, especially as you add complexity, outlined here.
Best way to structure a tkinter application?