View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mervyn Thomas Mervyn Thomas is offline
external usenet poster
 
Posts: 44
Default Sumif in VB Code

Can anyone tell me what is wrong with this bit of code which is in a loop
with a counter variable?
I am trying to define a formula on worksheet(2) based upon ranges in a
worksheet called "Timesheet" Everywhere else I have always used FormulaR1C1
style but that does'nt fit in this case.


Worksheets(2).Cells(Counter, 8).Formula =
"=SUMIF(Timesheet!(Cells(5,8),Cells(5,256)),1,Time sheet!(Cells(Counter,8),Ce
lls(counter,256))"