mardi 16 février 2016

VBS pharser in Excel sheet

Hello i have a XLS sheet of 1.000 rows. I must extract 30 rows random with almost a city and copy in other sheet. I have tried but i am going crazy.

i begin write this script but i need help.

Sub emp_to_dept() Dim wks As Worksheet Windows("Sales.xls").Activate For Each wks In ActiveWorkbook.Worksheets wks.Copy After:=Workbooks("SampleSheet.xls").Sheets(1) Next Set wks = Nothing End Sub

Here there is a sample of some rows. Please help me. Thank you. mariostia@hotmail.com




Aucun commentaire:

Enregistrer un commentaire