View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Costas Costas is offline
external usenet poster
 
Posts: 3
Default Worksheet functions in VB

I use a worksheet function in VB and specificly the sum
if. This is working properly but only for one cell what
is the easy way to do for a lot of cells.

Set Myrange = Sheet2.Range("a10:a100")
Sheet1.Range("f10") = _
Application.WorksheetFunction.SumIf((Myrange) _
, Sheet1.Range("b10"), Sheet2.Range("C10:C100"))