ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Time Error, FormulaR1C1 (https://www.excelbanter.com/excel-programming/405571-run-time-error-formular1c1.html)

[email protected]

Run Time Error, FormulaR1C1
 
Hi,

I get Error 1004 all the time and i don´t know what´s wrong.

My goal is to get the position of the last text in a column.

Worksheets("Transaktioner").Range("A1").FormulaR1C 1 =
"=IF(ISERROR(CELL(""address"";INDEX(Transaktioner! K:K;MATCH(REPT(""z"";
255);Transaktioner!K:K;1);1)));0;CELL(""address""; INDEX(Transaktioner!
K:K;MATCH(REPT(""z"";255);Transaktioner!K:K;1);1)) )"

The formula works when i paste it to my sheet. And i have replaced the
single " with "".

My first post here. I hope some kind person can help me.

Christheburg

Jim Cone

Run Time Error, FormulaR1C1
 

It worked for me after replacing the semi-colons with commas.
Also, as posted, the code needs an underscore following the first equal sign...
= _
You also might try changing .FormulaR1C1 to .Formula
However, it worked both ways for me.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




wrote in message
Hi,
I get Error 1004 all the time and i don´t know what´s wrong.
My goal is to get the position of the last text in a column.
Worksheets("Transaktioner").Range("A1").FormulaR1C 1 =
"=IF(ISERROR(CELL(""address"";INDEX(Transaktioner! K:K;MATCH(REPT(""z"";
255);Transaktioner!K:K;1);1)));0;CELL(""address""; INDEX(Transaktioner!
K:K;MATCH(REPT(""z"";255);Transaktioner!K:K;1);1)) )"
The formula works when i paste it to my sheet. And i have replaced the
single " with "".
My first post here. I hope some kind person can help me.
Christheburg


Dave Peterson

Run Time Error, FormulaR1C1
 
First, VBA is USA centric.

You'll want to change all the semicolons to commas. They'll be converted when
the formula is plopped into the worksheet cell.

Second, your formula doesn't look like it's in R1C1 reference style. It looks
like A1 reference style to me.

I'd try:

Worksheets("Transaktioner").Range("A1").Formula _
= "=IF(ISERROR(CELL(""address""," _
& "INDEX(Transaktioner!K:K,MATCH(REPT(""z"",255) " _
& ",Transaktioner!K:K,1),1))),0," _
& "CELL(""address"",INDEX(Transaktioner!K:K," _
& "MATCH(REPT(""z"",255),Transaktioner!K:K,1),1) ))"



wrote:

Hi,

I get Error 1004 all the time and i don´t know what´s wrong.

My goal is to get the position of the last text in a column.

Worksheets("Transaktioner").Range("A1").FormulaR1C 1 =
"=IF(ISERROR(CELL(""address"";INDEX(Transaktioner! K:K;MATCH(REPT(""z"";
255);Transaktioner!K:K;1);1)));0;CELL(""address""; INDEX(Transaktioner!
K:K;MATCH(REPT(""z"";255);Transaktioner!K:K;1);1)) )"

The formula works when i paste it to my sheet. And i have replaced the
single " with "".

My first post here. I hope some kind person can help me.

Christheburg


--

Dave Peterson

[email protected]

Run Time Error, FormulaR1C1
 
On 5 Feb, 01:55, Dave Peterson wrote:
First, VBA is USA centric.

You'll want to change all the semicolons to commas. *They'll be converted when
the formula is plopped into the worksheet cell.

Second, your formula doesn't look like it's in R1C1 reference style. *It looks
like A1 reference style to me.

I'd try:

Worksheets("Transaktioner").Range("A1").Formula _
* *= "=IF(ISERROR(CELL(""address""," _
* * *& "INDEX(Transaktioner!K:K,MATCH(REPT(""z"",255) " _
* * *& ",Transaktioner!K:K,1),1))),0," _
* * *& "CELL(""address"",INDEX(Transaktioner!K:K," _
* * *& "MATCH(REPT(""z"",255),Transaktioner!K:K,1),1) ))"





wrote:

Hi,


I get Error 1004 all the time and i don´t know what´s wrong.


My goal is to get the position of the last text in a column.


Worksheets("Transaktioner").Range("A1").FormulaR1C 1 =
"=IF(ISERROR(CELL(""address"";INDEX(Transaktioner! K:K;MATCH(REPT(""z"";
255);Transaktioner!K:K;1);1)));0;CELL(""address""; INDEX(Transaktioner!
K:K;MATCH(REPT(""z"";255);Transaktioner!K:K;1);1)) )"


The formula works when i paste it to my sheet. And i have replaced the
single " with "".


My first post here. I hope some kind person can help me.


Christheburg


--

Dave Peterson- Dölj citerad text -

- Visa citerad text -


It work´s perfect !

Thank´s a lot !

Christheburg


All times are GMT +1. The time now is 08:51 PM.

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