reference a cell from another worksheet using a variable

user3455321

I'm trying to refer to another worksheet (BASE tab) in the same workbook. I run the code below inside a couple of loops where x and y increment based on certain conditions. I've messed around with the code but I haven't had any luck. This is what I have so far but it does not work.

Cells(i, j) = "='BASE tab'!R[" & x & "]C[ & y & ]"

I want cells(i,j) to reference the other cells so I don't have to run my lengthy macro for minor value changes.

Tim Williams
 Cells(i, j) = "='BASE tab'!R[" & x & "]C[" & y & "]"

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Reference a cell from another worksheet

Reference to cell in another worksheet

How to sum excel data in another worksheet, using the value of a reference cell

Find data in a column from a cell reference in another worksheet then copy some data to another worksheet

How to copy data from one worksheet to another (using an indirect reference for the latter worksheet)

Referencing a cell from another worksheet in excel

Make a worksheet active depending on value in cell from another worksheet

Reference worksheet by cell value?

Reference a cell with input from another cell

Copy cell that equals cell value from another worksheet

How to automatically transfer data from one cell in one worksheet to another cell in another worksheet in the same workbook

creating worksheets from column in worksheet and using another worksheet as a template

VBA code to hide/unhide multiple rows in another worksheet based on cell output from another worksheet

How to copy a picture from another worksheet and paste inside a cell comment

Vba VLookup from another worksheet on VBA on cell change

copy and paste a cell from one worksheet to another and multiply it by a value

how to copy a cell from one worksheet to another, to the correct row

Using another cell value to reference a range

Getting Reference (url link) from another cell?

Reading in a range using a named cell reference and a variable

Using for each with a worksheet reference

Copy specific cell to another worksheet

How to get the cell reference from a gesture of another item in the cell

Google spreadsheet cell reference from value of another cell

Hyperlinking a cell to another cell in the same worksheet

Saving excel worksheet to CSV with file name from a cell using a macro

Excel: Using text from a cell as the name of a worksheet in a conditional formatting equation

Subscript out of range when referencing a worksheet in another workbook from a variable

Copy and paste a dynamically variable column with values from one worksheet into another