You would have to change IF and AND to the swedish equivalent.
You can try this
Sub MakeFormula()
Dim sForm as String
sForm = "=if(And(D6/1001.5,D6/100<25),100,if(And" & _
"(D6/2501.5,D6/250<25),250,if(D6/250" & _
"1.5,500,""can't use"")))"
Range("B16").Formula = sForm
End Sub
Paste that into a general module and run it.
It should put in a formula in B16 of the active sheet that your excel can
work with. You don't need to make any changes to the above - VBA should
work with the English version of the formula.
--
Regards,
Tom Ogilvy
"Peter L" wrote in message
...
Sorry Tom for my bad english - It wasn´t my meaning to affend you, I´m
very grateful for you help and support.
Anf yes I tried with both 1.5 and 1,5...
Can my truble depends on that my excel is "swedish speeking" and your
formula is in english?
/Peter
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!