Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Wy doesn't this sub works? I get "VÄRDEFEL!" (faild value) in Swedish The formula works in excel after F2 and Enter Sub Sum() myCol = "F" myFirstCell = myCol & "7" myLastCell = myCol & "24" myArea = myFirstCell & ":" & myLastCell mySumCell = myCol & "27" Range(mySumCell).Activate txt = "=SUM(" & myArea & ")" ActiveCell.Formula = txt ActiveCell.Calculate End Sub -- If you are old enough, you have your future behind you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I copied and pasted your code, it works fine, where did you place the code
and what data do you have in F7:F24? -- -John Please rate when your question is answered to help us and others know what is helpful. "KentAE" wrote: Hi, Wy doesn't this sub works? I get "VÄRDEFEL!" (faild value) in Swedish The formula works in excel after F2 and Enter Sub Sum() myCol = "F" myFirstCell = myCol & "7" myLastCell = myCol & "24" myArea = myFirstCell & ":" & myLastCell mySumCell = myCol & "27" Range(mySumCell).Activate txt = "=SUM(" & myArea & ")" ActiveCell.Formula = txt ActiveCell.Calculate End Sub -- If you are old enough, you have your future behind you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 5, 9:41 am, KentAE wrote:
Hi, Wy doesn't this sub works? I get "VÄRDEFEL!" (faild value) in Swedish The formula works in excel after F2 and Enter Sub Sum() myCol = "F" myFirstCell = myCol & "7" myLastCell = myCol & "24" myArea = myFirstCell & ":" & myLastCell mySumCell = myCol & "27" Range(mySumCell).Activate txt = "=SUM(" & myArea & ")" ActiveCell.Formula = txt ActiveCell.Calculate End Sub -- If you are old enough, you have your future behind you. This works fine in Excel 2000 (9.0.6926 SP-3) Cell F27 ends up =SUM(F7:F24) Try building the formula by hand in cell F27, or stepping through your function in the visual basic debugger. There may be some variance from your version of Excel to mine. Brian Herbert Withun |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need VB formula to execute form | Excel Worksheet Functions | |||
Excel Formula Doesn't Execute (Shows formula-not the calcuation) | Excel Discussion (Misc queries) | |||
execute once formula | Excel Programming | |||
VBA Formula Fails to Execute | Setting up and Configuration of Excel | |||
execute a text as a formula | Excel Programming |