Excel 2010 VBA Error 1004 with formula

后端 未结 1 1517
挽巷
挽巷 2020-12-19 15:09

I have this code:

Dim fStrecke As String
fStrecke = \"=A\" & z & \"*B\" & z & \"*C\" & z
wks.Cells(z, \"L\").Formula = fStrecke

Dim fZei         


        
相关标签:
1条回答
  • 2020-12-19 15:20

    There are two options for you:

    1. use .FormulaLocal property: wks.Cells(z, "K").FormulaLocal = fZeit
    2. use comma , as separator instead of semicolon ; (even if your local settings require ; as standard separator):

    fZeit = "=IF(ISBLANK(H" & z & "),((A" & z & "*B" & z & "*I" & z & ")-I" & z & ")+(A" & z & "*B" & z & "*J" & z & "),(A" & z & "*B" & z & "*H" & z & "))"
    wks.Cells(z, "K").Formula = fZeit
    
    0 讨论(0)
提交回复
热议问题