Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula from VBA to Excel worksheet
How do I get this formula from VBA into a cell in an
Excell worksheet. Code first. sVSTid = Cells(lRaekke, 7).Address sHvis = "=+hvis($i$230;$i$23*" & sVSTid sVSLoen = Cells(lRaekke, 22).Address sEllers = ";" & sVSLoen & ")" sSumFormel = sHvis & sEllers Debug.Print sSumFormel It gives this formula: =+hvis($i$230;$i$23*$G$46;$V$46) (danish IF-function) It keeps failing me no matter what I do. So I must do something wrong. Please help me Lars Kofod |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula from VBA to Excel worksheet
Hi,
VBA is US-centric. Use "," instead of ";" Cheers, Olivers -- Oliver Kharraz "Lars Kofod" wrote in message ... How do I get this formula from VBA into a cell in an Excell worksheet. Code first. sVSTid = Cells(lRaekke, 7).Address sHvis = "=+hvis($i$230;$i$23*" & sVSTid sVSLoen = Cells(lRaekke, 22).Address sEllers = ";" & sVSLoen & ")" sSumFormel = sHvis & sEllers Debug.Print sSumFormel It gives this formula: =+hvis($i$230;$i$23*$G$46;$V$46) (danish IF-function) It keeps failing me no matter what I do. So I must do something wrong. Please help me Lars Kofod |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula from VBA to Excel worksheet
cells(1,1).FormulaLocal = sSumFormel
-- Regards, Tom Ogilvy "Lars Kofod" wrote in message ... How do I get this formula from VBA into a cell in an Excell worksheet. Code first. sVSTid = Cells(lRaekke, 7).Address sHvis = "=+hvis($i$230;$i$23*" & sVSTid sVSLoen = Cells(lRaekke, 22).Address sEllers = ";" & sVSLoen & ")" sSumFormel = sHvis & sEllers Debug.Print sSumFormel It gives this formula: =+hvis($i$230;$i$23*$G$46;$V$46) (danish IF-function) It keeps failing me no matter what I do. So I must do something wrong. Please help me Lars Kofod |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Formula from one workbook/worksheet to another | Excel Worksheet Functions | |||
Formula for Excel Worksheet | Excel Worksheet Functions | |||
If Then Else Formula for Excel Worksheet | Excel Worksheet Functions | |||
How do I make formula in Excel from other worksheet? | Excel Worksheet Functions | |||
Display excel formula on worksheet | Excel Worksheet Functions |