Formula from VBA to Excel worksheet

  • Thread starter Thread starter Lars Kofod
  • Start date Start date
L

Lars Kofod

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$23>0;$i$23*" & sVSTid
sVSLoen = Cells(lRaekke, 22).Address
sEllers = ";" & sVSLoen & ")"
sSumFormel = sHvis & sEllers
Debug.Print sSumFormel

It gives this formula: =+hvis($i$23>0;$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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top