how do i enter R1C1 in VBA for a seperate worksheet w/o skipping

ungoliath

Board Regular
Joined
Oct 21, 2004
Messages
113
Here's my code

For k = 1 To Project_Columns
Sheets(Project_Titles(k)).Activate
Cells(1, 1).Activate
For i = 1 To POC_Rows
If POC_data(i, k) = 1 Then
For j = 1 To 6
Cells(24 + i, 15 + j) = "='POC Information'!R[" & i + 15 & "]C[" & j - 15 & "]"
Next j
End If
Next i

the problem I get is that the R1,C1 are determined based upon the active cell. How do I input this in absolute coordinates so that the cell value doesn't continually skip a cell.

When I run this code I get cell (25,16)="POC Information!R47"
but cell (25,17)="POC Information!T49" instead of "POC Information!S49" like I'd prefer.
 
I was able to find the absolute reference. Just get rid of the brackets. The code works perfectly now. Thanks to everyone who replied.
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top