View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
nougain[_3_] nougain[_3_] is offline
external usenet poster
 
Posts: 1
Default UDF to compute using ranges


I am getting compilation error at "dateRange = CSR!$O$20:$O$351" line
It gives error for $ use in the statement.

Thanks



Bob Phillips Wrote:
You don't say what doesn't work and then give us pseudo-code, but no
that
SUMOF is a worksheet function, to use in VBA try

Application.SUMIF(dateRange, "<=" & (endDate + 2), dataRange)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct


--
nougai
-----------------------------------------------------------------------
nougain's Profile: http://www.excelforum.com/member.php...fo&userid=3203
View this thread: http://www.excelforum.com/showthread.php?threadid=51782