Hi,
I have a variable for exchange rate (Dim rate1 as Long). It does not evaluate correctly. rate1 evaluates as 1 in the VBA code, and it evaluates as 1.2701 in the immediate window using the same formula. It looks like it takes the integer value even though i declared it to be a long variable. If I change the rate to 2.2701 it evaluates as 2 in the code, and as 2.2701 in the immediate window.
any idea why?
thanks!
rate = Application.Index(Sheets("Exchange Rates").Range("A1:C1000"), _
Application.Match(Mid(trffromacc, 5, 3), Sheets("Exchange Rates").Range("A:A"), 0), 2)
rate1 = Application.Index(Sheets("Exchange Rates").Range("A1:C1000"), _
Application.Match(Mid(trftoacc, 5, 3), Sheets("Exchange Rates").Range("A:A"), 0), 2)
https://onedrive.live.com/redir?resi...nt=photo%2cpng
Bookmarks