why might the following return a type mismatch error?
Dim Arrow As Workbook
If wb.Name Like "*Arrow*" Then
Set Arrow = wb
dplastrow = activeworkbook.Worksheets(1).UsedRange.Rows(Worksheets(1).UsedRange.Rows.Count).Row
LastArrow = Arrow.ActiveSheet.UsedRange.Rows(ActiveSheet.UsedRange.Rows.Count).Row
For Each account In activeworkbook.Worksheets(1).Range("D11:D" & dplastrow)
For x = 2 To LastArrow
If (Trim(Right(account.Offset(0, 1), Len(account.Offset(0, 1) - 2))) = Arrow.Worksheets(1).Cells(x, "BL")) Then
'some action
I was able to vlookup and return it's matching value in the actual excel gui no problem. I've tried enveloping the cells in cstr(, val( and/or affixing them with .text to no avail.