I'm having a problem either with the syntax of the formula or the the whole formula itself... I need a correlation of two percent-value columns on separate sheets, given a date range... :S

=CORREL(IF(EURCHF!A:A, "<="&C1, EURCHF!A:A, ">="&A1, GBPUSD!A:A, "<="&C1, USDGBP!A:A, ">="&A1, "") GBPUSD!D:D,EURCHF!D:D))

-The formula is in one sheet, and the columns to correlate are on two separate worksheets.
-Cells A1 and C1 are the specified date ranges I need to filter by.
-Range A:A contains date values
-Range D:D contains percentage values (what I'm attempting to run a correlation on)
(Yes, I'm also entering the array with C+S+E...)

Help !