#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Formular1c1

Anyone know why this won't work? Can I not mix R1c1 with a direct cell
reference like B1? And if not, How do I replace $B$3 with something in r1c1
format? Thanks!


Set colb = ActiveCell.Offset(0, -2)
colb.FormulaR1C1 = "=IF(RC[-1]=""Open"",MAX($B$3:R[-1]C[-2])+1,"""")"


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formular1c1

no, you can't. Use:

Set colb = ActiveCell.Offset(0, -2)
colb.FormulaR1C1 = "=IF(RC[-1]=""Open"",MAX(R3C2:R[-1]C[-2])+1,"""")"


--
Regards,
Tom Ogilvy

"Steph" wrote in message
...
Anyone know why this won't work? Can I not mix R1c1 with a direct cell
reference like B1? And if not, How do I replace $B$3 with something in

r1c1
format? Thanks!


Set colb = ActiveCell.Offset(0, -2)
colb.FormulaR1C1 = "=IF(RC[-1]=""Open"",MAX($B$3:R[-1]C[-2])+1,"""")"




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Formular1c1

Yes - you cannot mix...

R1C1 reference is straight forward

R1 refers to row 1, change the number to whatever row you want
C1 refers to column A, B=2, C = 3 ..... (numbers are absolute reference)

So $B$3 = R3C2

When you put the number in brakets [1] it becomes a relative reference to
the cell it is in.
1 is one cell away, 2 is two .... Add a - and the direction is reversed.
Works on row and column

so R[1]C[1] is one cell down and one cell to the right
R[-1]C[-1] is one cell up and one cell to the left.

removing the numbers references this row and/or this column
RC is this cell
--
steveB

Remove "AYN" from email to respond
"Steph" wrote in message
...
Anyone know why this won't work? Can I not mix R1c1 with a direct cell
reference like B1? And if not, How do I replace $B$3 with something in
r1c1
format? Thanks!


Set colb = ActiveCell.Offset(0, -2)
colb.FormulaR1C1 = "=IF(RC[-1]=""Open"",MAX($B$3:R[-1]C[-2])+1,"""")"




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
FormulaR1C1 Aksel Børve Excel Programming 2 February 28th 05 09:52 PM
activecell.formular1c1 monika Excel Programming 0 April 29th 04 10:13 AM
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


All times are GMT +1. The time now is 04:17 AM.

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

About Us

"It's about Microsoft Excel"