Adding a number to a specific cell using R1C1

SlinkRN

Well-known Member
Joined
Oct 29, 2002
Messages
715
Hi all! I usually use A1 reference style in my vba code but for the process I am about to do, it would really help to be able to use R1C1 so that I can use numbers for both the column and the row. I'm sure this is really simple, but I've been searching and trying things and still can't seem to figure it out.
I will be having 2 variables called Week and Team. The Week variable be the row number and the Team variable will be the column number. Once I have those two variable filled with, for example, 32 and 8, how do I then put a number in the cell that corresponds to R32C8 rather than using
Sheets("Schedule").range("H32") = 1
which is my usual way of doing it.
I would really love to be able to use my variables in the R1C1 reference also but I'm not sure if that's even possible. Something like "R & Week & C & Team" which would put the number one in R32C8
Thanks, Slink
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Use Cells instead of Range
VBA Code:
Sheets("Schedule").Cells(Week, Team).Value = 1
 
Upvote 1
Solution
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,170
Members
448,870
Latest member
max_pedreira

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