I want to use the Bin2Hex method with variable names. Two columns of binary data are in columns C and D in worksheet 2 (W2). The formula will be in a cell a1 on worksheet 1 (W1). The Excel formula is simple:
=(W2!C1 & W2!D1 for the data in row 1. But how do I do this with variables replacing C1 and D1? I've spent hours attempting to sort this.
Here is one method I tried but I get an error
[VBA]sheets("W2").activate
var1=range("C2")
var2=range("D2")
sheets("W1").activate
Range("a1").Formula = "=bin2hex(W1!"var1 "& W2! "var2")"[/VBA]
The other issue is in var1 and var2, I will have to assign these dynamicaly to different cells. Not quite sure of the format here?
This can't be that hard.