[VBA ] 函數(formula)的問題

看板Visual_Basic作者 (鋼彈)時間14年前 (2011/06/22 15:22), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我要在vba中寫formula 我知道可以用 sheet.cells(1,4).formula="=sum(A1:C1)" cells(1,4)就是D1 但是現在我的程式可能是要讓D1=A1加到C1 或是E1=A1加到D1,D或E是前面的程式決定的 也就是 dim v as integer v=4 ' or 5,6,7,.... for i = 1 to 10 sheet.cells(i,v).formula=....... next i 那串.......我想讓他從cells(i,1)加到cells(i,v-1) 請問有人會嗎?謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.219.200.162
文章代碼(AID): #1E0PWr1Z (Visual_Basic)