Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Formula from one workbook/worksheet to another SuziQ Excel Worksheet Functions 3 May 23rd 08 06:06 PM
Formula for Excel Worksheet Lynda Excel Worksheet Functions 3 May 15th 08 12:31 AM
If Then Else Formula for Excel Worksheet pabell Excel Worksheet Functions 5 September 12th 07 12:10 AM
How do I make formula in Excel from other worksheet? Ariel in LA Excel Worksheet Functions 1 March 15th 05 10:57 AM
Display excel formula on worksheet superchica Excel Worksheet Functions 2 November 3rd 04 06:38 PM


All times are GMT +1. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"