I am a real rookie in this arena and not sure how to record what
I want to do. However, after a lot of reading, I THINK I am a little closer,
but not sure. Below is the code. When I execute the code, I get the error
message Run-time error '13' -- Type-mismatch on line 4 below (Set myRange =
....).
Dim myWB As Excel.Workbook
Set myWB = GetObject("E:\AORP Project\PPA_200610.xls")
Dim myRange As Range
Set myRange = myWB.Sheets("October 06").Range("C5:C62")
txtTot = myWB.Application.WorksheetFunction.VLookup("Iowa", Range(myRange),
5, False)
Set myWB = Nothing
The State Names are in C5:62 (which I believe is the Range) and I want to get
the value in column 5 of the row I found the State in.
Do you have any idea where I am going wrong?