excel - HLookup() with date: Already tried CLng() -
the following code. want find row value of cell in workbook ("x" in here), matching dates. code running isn't returning value.
cells(2,10)
date (written dic-13), , first row of range("b8:j9")
range
of date ( "dic-11", "dic-12", "dic-13" etc...)
sub buscardatos() dim y workbook dim x workbook set y = application.activeworkbook set x = application.workbooks.open("g:\estudios\biblioteca\mercado accionario _ chileno\insertarempresa.xlsm") y.sheets("información financiera").cells(range("j3").row, range("j3").column) = _ application.hlookup(clng(cells(2, 10)), _ x.sheets("cencosud").range("b8:j9"), 2, false) end sub
try this
sub buscardatos() dim y workbook dim x workbook set y = application.activeworkbook set x = application.workbooks.open("g:\estudios\biblioteca\mercado accionario chileno\insertarempresa.xlsm") 'modified line y.sheets("información financiera").cells(range("j3").row, range("j3").column) = application.hlookup(y.sheets("información financiera").cells(2, 10), x.sheets("cencosud").range("b8:j9"), 2, false) 'modified line end sub
Comments
Post a Comment