excel - Macro which points the cell represented by an array element -



excel - Macro which points the cell represented by an array element -

i have 2 columns in excel sheet . first column has other cell address illustration - column has contents f1, f2, f3, f4 , f5. sec column has other cell address illustration - column b has contents x1, x13, x17, x72.

now want macro can re-create contents of cells mentioned in column first (want re-create contents of f1 ...f5) cells mentioned in column 2.

please help

assuming each cell in column contains single cell address:

sub transfervalues() dim rnga range dim rngb range dim srcaddress range dim destaddress range dim r long 'row iterator set rnga = range("a2", range("a2").end(xldown)) set rngb = rnga.offset(0, 1) r = 1 rnga.rows.count set srcaddress = range(rnga(r).value) set destaddress = range(rngb(r).value) destaddress.value = srcaddress.value next end sub

excel excel-vba

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -