VBScript that exports filtered information from excel onto a webpage?
I'm extremely new to VBScript and have been trying to figure this out for
the last couple of days, searching hundreds (literally) of forums/websites
and can't find a solution to meet my needs so here goes :P.
I currently have a spreadsheet that contains a large list of customer
details, for example;
MPN | Manager's Name | Question?
077 | John Smith | Yes
077 | Jane York | No
I'm trying to extract the information to a webpage, or even possibly a new
excel file but have the option of only displaying cells that have "No" to
the question and filtering them so the managers are seperate
So far, I have;
Sub testing123()
Workbooks.Open Filename:="P:\book.xls"
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveSheet.Range("$B$4:$K$65536").AutoFilter Field:=10, Criteria1:= _
"=Question", Operator:=xlOr, Criteria2:="=Yes"
ActiveWorkbook.SaveAs Filename:="P:\book123.xls", FileFormat:=xlExcel8, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
End Sub
The code above resides in a separate excel sheet, it opens the main
workbook, filters the information (question=yes) and saves it as a
different name. My aim is to be able to extract the information onto a
different sheet but directly extract only the filtered information, and be
sort able depending on managers name for example.
I'm so sorry if this is hard to understand, and I apologize for the lack
of relevant code to display, but please if you need anymore information
just let me know
No comments:
Post a Comment