The next version.....
_... to be looked at laterCode:Sub test() ' https://www.excelforum.com/excel-programming-vba-macros/1321581-put-data-in-series-by-vba.html#post5363303 Dim r As Range, x, BK As String, myVal BK = "'" & ThisWorkbook.Path & "\[1(sample).xls]1-Sheet1'!" With Sheets("sheet1") For Each r In .Range("b2", .Range("b" & Rows.Count).End(xlUp)) myVal = r.Value If Not IsNumeric(myVal) Then myVal = Chr(34) & myVal & Chr(34) x = ExecuteExcel4Macro("match(" & r.Value & "," & BK & "r1c9:r10000c9,0)") If IsNumeric(x) Then With .Cells(r.Row, Columns.Count).End(xlToLeft) .Cells(1, 2) = .Value + 1 End With End If Next End With End Sub
( Note Yasser found it intersting ... https://eileenslounge.com/viewtopic.php?f=30&t=34952 )
Share '1(sample) excelforum 11july.xls' : https://app.box.com/s/q44t3dglvoq59ozvyi4c411ekw0aox9s
Share 'H2(SAMPLE) excelforum 11July.xlsb' : https://app.box.com/s/ziudkeb2bdmdosxhcrcx6g243sjn7n7x




Reply With Quote

Bookmarks