This seems so simple, but.

I have 2 worksheets, W1 and W2. W2 contains multiple rows of binary data but for simplicity assume for this example the data is in columns C and D and there are 5 rows of it such as:
C D
0 1
1 1
1 0 etc.

W1 is to fill in non-adjacent cells in column A. For example, row 6 might use the Excel formula: =bin2hex(W2!C1 & W2!D1). Column A, row 11 might be =bin2hex(W2!C2 & W2!D2).

But the formula is not to use Cn and Dn (specific cells) but rather two variables, call them x and y. I have read that VBA can’t handle variables in formulas and I have confirmed that by trying multiple formulas such as

=”=bin2hex(W2!x & W2!y)” resulting in an error.

It was also suggested that I use R1C1 format but I can’t figure out the code to do this correctly.

Thanks in advance.