This function reads the spreadsheet and gets the data that is in the cell with a fieldname - I'd like to add the option that if the value is field position (e.g. "B2" then use that as well) how to do that with the code below?

Public Function ReadExcelDataSinglebycol(sFileName,iCol,sFieldName ,vSheet)
'Option explicit
Dim sData
Dim iNoError
Dim sCurrentProc
Dim sWinDir
Dim lResult
Dim strMsgText
Dim iColNum
Dim iRowNum
Dim sTestData
Dim ColHead
Set fso = CreateObject("Excel.Application")
Set xlObj = fso
'Set objWorkSheet = xlObj.Workbooks.Open (sFileName,,"True")
Set objWorkBook = xlObj.Workbooks.Open (sFileName,,"True")
'Count Columns
Set objWorkSheet = objWorkBook.WorkSheets(vSheet)
ColCount = objWorkSheet.UsedRange.columns.count
RowCount = objWorkSheet.UsedRange.rows.count
'ColCount = objWorkSheet.UsedRange.columns.count

set oSearchRegion = objWorkSheet.Range(objWorkSheet.cells(1,1),objWork Sheet.cells(RowCount, 1 ))
notfound = ""
with oSearchRegion
set oSearchResult = .Find(sFieldName)
if not oSearchResult is nothing then
iColNum = oSearchResult.column
FirstCol = iColNum
FoundVal = objWorkSheet.Rows(1).Columns(iColNum).Value
if sFieldName <> FoundVal then
set oSearchResult = .Findnext(oSearchResult)
iColNum = oSearchResult.column
FoundVal = objWorkSheet.Rows(1).Columns(iColNum).Value
loop while FirstCol <> iColNum and sFieldName <> FoundVal
if instr(FoundVal,sFieldName)= 0 then notfound = "Y"
end if
notfound = "Y"
end if
End With

'Retrieve the value from the cell
sData = ""
if notfound = "" then
sData =objWorkSheet.rows(iRow).Columns(iColNum).Value
end if

sData = Trim(sData)

ReadExcelDataSingle = sData
Set fso=nothing
Set oExcel = nothing
Set objWorkSheet = nothing
Set objExcel = nothing
Set objWorkBook = nothing
End Function