Excel duplicate names picking the one with a value

rjhe22

Well-known member
Joined
May 22, 2008
Messages
88
Programming Experience
Beginner
hi
i have this code that reads in values from an excel file based on the names in a column
VB.NET:
 oRng = oWSSheet.Cells.Find("Interest withholding tax expense", , _
Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart, _
Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, False)
        ' MsgBox("Value '" & oRng.Value & "' found at '" & oRng.Address)
        Me.incexp = oRng.Offset(0, 5).Value 
        oRng = Nothing
in the excel sheet Interest withholding tax expense is in the sheet twice one with 0.00 and one with say 123.12. how do i get it to read the second Interest withholding tax expense sop i get that value
 
Back
Top