0

The range i want to use is in the below R1C1 format. How do i use it to put a value into the cell.

Myrange = sheets(1).range("A1").address(referencestyle:=R1C1)

Myrange = "value" (not working.)

The range is actally used in a loop with many conditions and vary by conditions. I dont want to write the whole conditions once again just to put a value in a cell.

Hound
  • 1
  • 3
  • 1
    `Address` returns a string, not a Range object. What exactly is in A1? – Tim Williams Mar 05 '21 at 01:26
  • Maybe you just want `sheets(1).range("A1").Value = "blah"` ? – Tim Williams Mar 05 '21 at 01:39
  • Myrange is a refrence to the location of one of 4 pivot table needs to go into. I am using a loop and 4 different conditions to decide the location of the cell. Now i just need to edit a cell below myrange. And i thought i dont have to write the address to that cell since i have my range in action. – Hound Mar 05 '21 at 02:31

0 Answers0