View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim May Jim May is offline
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