Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Failing to assign expression to FormulaR1C1, what am I doing wrong?


Hi. I have the following two lines in a macro to copy/paste the sam
expression to about 23000 rows.

Sheet2.Range("B2").FormulaR1C1
"=OR(ISBLANK(RC15);ISBLANK(RC16))"
Sheet2.Range("B2").Copy Sheet2.Range("B2:B" & g_LastRowIndex)

However when the first line is executed it fails with
"Application-defined or object-defined error" message, aka. error 1004
What am I doing wrong? Btw, if you remove the "OR" statement from th
expression, the line doesn't fail... Isn't that odd?

Thx in advance,
Johanne

--
SysRq200
-----------------------------------------------------------------------
SysRq2000's Profile: http://www.excelforum.com/member.php...fo&userid=1453
View this thread: http://www.excelforum.com/showthread.php?threadid=26153

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Failing to assign expression to FormulaR1C1, what am I doing wrong?

Try (in your OR Statement) replacing the ; with a ,

"SysRq2000" wrote in message
...

Hi. I have the following two lines in a macro to copy/paste the same
expression to about 23000 rows.

Sheet2.Range("B2").FormulaR1C1 =
"=OR(ISBLANK(RC15);ISBLANK(RC16))"
Sheet2.Range("B2").Copy Sheet2.Range("B2:B" & g_LastRowIndex)

However when the first line is executed it fails with a
"Application-defined or object-defined error" message, aka. error 1004.
What am I doing wrong? Btw, if you remove the "OR" statement from the
expression, the line doesn't fail... Isn't that odd?

Thx in advance,
Johannes


--
SysRq2000
------------------------------------------------------------------------
SysRq2000's Profile:

http://www.excelforum.com/member.php...o&userid=14530
View this thread: http://www.excelforum.com/showthread...hreadid=261539



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
ActiveCell.FormulaR1C1 Rick Excel Discussion (Misc queries) 3 March 28th 10 10:36 PM
FormulaR1C1 D.S.[_3_] Excel Programming 2 January 2nd 04 12:03 AM
FormulaR1C1 D.S.[_3_] Excel Programming 0 January 1st 04 09:12 PM
FormulaR1C1 aapp81[_22_] Excel Programming 3 December 3rd 03 10:47 PM
Whats wrong with this VBA statement -ActiveCell.FormulaR1C1...? hal Excel Programming 5 November 8th 03 02:48 AM


All times are GMT +1. The time now is 07:36 AM.

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"