excel - VBA code to subtract first two digits from a range -


i have code copy data 31 excel file , merge 1 file, did job have 1 issue; im copying 1 cell every source file , past in records in destination file (every file 31 have different value im copying value , paste beside records) issue need substract value copy first 2 digits code copy in cell "g2" , past in column a.. can please me im not vba expert googeled code.

    set sourcedate = workbk.worksheets(1).cells.range("g2")     set distdate = summarysheet.range("a" & nrow)     set distdate = distdate.resize(sourcerange.rows.count - 1) 

'change declaration of sourcedate string if in range dim sourcedate string  sourcedate = left(workbk.worksheets(1).cells.range("g2"), 2) 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -