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.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Can't you just select a cell? Where you have Cells(1, 1).Activate change it to Cells(1,1).Select. Your R1C1 should then be based on that selected cell. The rest of your code doesn't seem to ever select a different cell.
 
Upvote 0
Could you use something like this?:

Cells(3, "D").Formula = "=IF(AND(D2>=0,D2<B2*0.05),CEILING(B2*0.05,1),D2)"
 
Last edited:
Upvote 0
What is it you want to happen?

do you simply want to make one cell (always the same) in the Project Titles sheet to match a specific cell in the POC Information sheet?

Do you need any portion of that to be flexible/variable?
 
Upvote 0
@JMThompson

that's pretty much what I'm trying to do. I'm actually setting up an update macro that populates a project sheet w/ all the information from my POC sheet that's related to a specific project. It will update a contacts area of the project sheet w/ links to the POC tab. It doesn't need to be linked but that seemed much simpler than trying to populate the chart based on array data (I'm beginning to think I may be wrong on that one).
 
Upvote 0
@ andrew paulson

What does an absolute R1C1 reference look like, especially if it's on another sheet?
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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