ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   recording macro to paste a copied ws formula (https://www.excelbanter.com/excel-programming/318778-recording-macro-paste-copied-ws-formula.html)

Peter[_21_]

recording macro to paste a copied ws formula
 
Hello everyone,

Using the macrorecorder to record the pasting of a copied worksheetformula
into a cell seems to cause a problem for a ws-formula that has, in this
case, 252 characters. (Dutch MS-Office-Excel 2003/XP Home Dutch)

Is there a way to have vba code insert such a long worksheetformula into a
cell?

For all intents and purposes I hereby give you the formula as is when the
worksheet containing it is opened in the English version of MS-Office-Excel
XP):

=IF(ISERROR(IF(LEFT(id_projectie;4)="oud:";0;ROUND (SUM(D3:OFFSET(INDIRECT(E1
9);0;-1))/MAX(E3:E14)*(12-MAX(E3:E14));2)));"";IF(LEFT(id_projectie;4)="oud:
";0;ROUND(SUM(D3:OFFSET(INDIRECT(E19);0;-1))/MAX(E3:E14)*(12-MAX(E3:E14));2)
))

The dutch words in this formula translate to:
IF ALS
ISERROR ISFOUT
LEFT LINKS
ROUND AFRONDEN
OFFSET VERSCHUIVING

Thanks for your help

Peter



Ron de Bruin

recording macro to paste a copied ws formula
 
Hi Peter

I don't see your code but if you use
activecell.Formula = ...........................

Then use a , instead of ; in the VBA code (VBA = US)
It will change it to ; when you open it in a Duch version

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter" wrote in message ...
Hello everyone,

Using the macrorecorder to record the pasting of a copied worksheetformula
into a cell seems to cause a problem for a ws-formula that has, in this
case, 252 characters. (Dutch MS-Office-Excel 2003/XP Home Dutch)

Is there a way to have vba code insert such a long worksheetformula into a
cell?

For all intents and purposes I hereby give you the formula as is when the
worksheet containing it is opened in the English version of MS-Office-Excel
XP):

=IF(ISERROR(IF(LEFT(id_projectie;4)="oud:";0;ROUND (SUM(D3:OFFSET(INDIRECT(E1
9);0;-1))/MAX(E3:E14)*(12-MAX(E3:E14));2)));"";IF(LEFT(id_projectie;4)="oud:
";0;ROUND(SUM(D3:OFFSET(INDIRECT(E19);0;-1))/MAX(E3:E14)*(12-MAX(E3:E14));2)
))

The dutch words in this formula translate to:
IF ALS
ISERROR ISFOUT
LEFT LINKS
ROUND AFRONDEN
OFFSET VERSCHUIVING

Thanks for your help

Peter





Ron de Bruin

recording macro to paste a copied ws formula
 
Hi Peter

After a private mail I understand your situation.

Here is the problem
http://support.microsoft.com/default...b;en-us;212172



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Hi Peter

I don't see your code but if you use
activecell.Formula = ...........................

Then use a , instead of ; in the VBA code (VBA = US)
It will change it to ; when you open it in a Duch version

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter" wrote in message ...
Hello everyone,

Using the macrorecorder to record the pasting of a copied worksheetformula
into a cell seems to cause a problem for a ws-formula that has, in this
case, 252 characters. (Dutch MS-Office-Excel 2003/XP Home Dutch)

Is there a way to have vba code insert such a long worksheetformula into a
cell?

For all intents and purposes I hereby give you the formula as is when the
worksheet containing it is opened in the English version of MS-Office-Excel
XP):

=IF(ISERROR(IF(LEFT(id_projectie;4)="oud:";0;ROUND (SUM(D3:OFFSET(INDIRECT(E1
9);0;-1))/MAX(E3:E14)*(12-MAX(E3:E14));2)));"";IF(LEFT(id_projectie;4)="oud:
";0;ROUND(SUM(D3:OFFSET(INDIRECT(E19);0;-1))/MAX(E3:E14)*(12-MAX(E3:E14));2)
))

The dutch words in this formula translate to:
IF ALS
ISERROR ISFOUT
LEFT LINKS
ROUND AFRONDEN
OFFSET VERSCHUIVING

Thanks for your help

Peter








All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com