Sumif - User defined Function

  • Dear all,

    I am trying to write a user defined function to help me collect fx rate information for a particular date, from another data connected excel workbook.

    This second workbook will open automatically when I start excel, refresh its connection from main data source and remain hidden.

    Below I post the formula I have come up with, somehow I could not get the function to work properly. Your thoughts and recommendations on how I can make this work and improve are much appreciated.




  • Did you get any kind of error message popping up? If so, can you please post up a screenshot of the error message? Or was it something like #N/A in the cell where the function is called from? To help identify the source of the issue, need to first narrow down which line in the code is failing. For example, it could be failing on line 3, 5 or 8 (or on multiple lines). Or it could be having troubles with the argument "day".