View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jzz Jzz is offline
external usenet poster
 
Posts: 20
Default Why does this not work

I don't know exactly what you want to accomplish, so maybe I solved the
wrong problem, but do you want something like this to happen?

Sub test()
Dim ofst As Integer, rng2 As String
Dim QUAD As String
ofst = 0
QUAD = 1

rng2 = "B" & (ofst + 5) & ":HZ" & (ofst + 5)
Cells(ofst + 4, 2).Value = "=SumIf(B4:HZ4, " + QUAD + "," + rng2 + ")"

End Sub

If so, good luck with it.

Grtz

Jzz