Using Power Query To Do Multiple Searches On Website?
Jul 10, 2014
I've been trying to get power query to search a list of parcel numbers on an assessor site: [URL]. The problem I'm getting, every time you put in a different parcel number, you get the same URL for the results. I want to extract just a few pieces of information for each parcel search, but I can't initiate a search through excel. I'm thinking the problem is in the Data source settings. How can just get it to show me the assessors page results for a single parcel search in excel?
To summarize - Columns B through E are current MLB Players who I am trying to compare with the data in Columns G though J. My goal is to both use index and match to find the following in Column L: A comparable player name using the criteria of having an exact match for both position and age, but the closest approximation match between Columns E and J.
I have deleted a significant amount of player data to be able to upload the document on this site.
I am trying to find a way to combined exact and approximate matches in one single formula, but have been unsuccessful thus far.
I love Excel and love learning new things to do in it to create some amazing number-crunching techniques. I have created a workbook with multiple worksheets [one for every month in the year]. I searched this amazing forum and succesfully implemented the search box macro to find and copy the found data on a separate worksheet.
My question is that the macro I found in the this post Creating a Search Box in Excel only searches for the data in one worksheet. How do I tell it to search for the inputted data in all worksheets?
Here is the first part of the macro. I was trying to fiddle around with the strDataShtNm but to no avail.
Code:
Sub myFind() 'Standard module code, like: Module1. 'Find my data and list found rows in report! Dim rngData As Object Dim strDataShtNm$, strReportShtNm$, strMySearch$, strMyCell$ Dim lngLstDatCol&, lngLstDatRow&, lngReportLstRow&, lngMyFoundCnt&
On Error GoTo myEnd '*******************************************************************************
strDataShtNm = "Sheet2" 'This is the name of the sheet that has the data! strReportShtNm = "Sheet1" 'This is the name of the report to sheet!
I have data created by a program where it gives me a column "Code" with different text categories (in this case names of people). One person appears multiple times in this column as it track each time they register a statistic for the sporting event. The statistics are text fields registered under the column Labels
So I have two columns titled "Codes" and "Labels"
I need to extrapolate from this data a count of times each statistic happens for a specific player.
Example: Code: Labels: John FGA John FGM Joe FGA Joe OREB Zach TO
What I need is broken down by player with counts of each category FGA, FGM, OREB ect specific for each player creating a box score for the event.
I would like to ask recommendations whether to use DSum or Vlookup, in order to do multiple search.
We receive a flat file on a daily basis, which contains four (4) columns. They are Group, Team, Taskname, and Number_of_Employees. The first three columns have text properties and the last one has number property. We copy this sheet into our workbook. There are more than 1,000 rows. I name this tab, "TotalWorkersbyTask".
Each group (first column) has its own tab. We try our best to name each tab to match the name of the first column.
We would like to find the unique value, in order to put the correct Number_Of_Employees into the correct column on each sheet. However, the relationship per column is many to many, which makes it more difficult.
For example,
Group,Team, TaskName, Number_of_Employees
12GR, Robert, Analyze raw data, 2.5 12OV, Tim, Analyze raw data, 1.25 12OV, Bob, Prepare reports, .85 16CJ, Jim, Prepare reports, .50 1008, Mary, Analyze raw data, .25 ............
Each tab, such as 12GR, will have the task name on the line "Analyze raw Data" which matches the information "TotalWorkersbyTask" tab.
The problem is, if I do a Vlookup for Taskname only, only the first value of 2.5 will return in to the Number_of_Employees column.
For the tab of group 12GR, the logic supposes to be -> if the group is 12GR, and the name of the task equal to the one appeared in "TotalWorkersbyTask", return me the value of 2.5 in the specific row. With the same logic, on the tab 12OV, the same task name should return me the value of 1.25 as well.
As you see from the example, line 2 and line 3 are the tasks in the same tab, from the flat file received.
Then, this formula can be copied and populated into other rows and other sheets as well.
********************* Questions:
1. Is there anyway to write the formula to gather the required information? My thought was using the Vlookup. However, it can see only one column.
2. Do I need to rename all the tabs to match the name of the first column received from flat file in order to make it more efficient? (In the present, there are some tabs that match the name, such as 12OV, and some tabs are something like ->Engineering, Research, etc.)
Is it possible to do multiple file searches in one macro? Or does the data get stored in such a way that they'd conflict? First I want to search a folder for other folders. Then I want to search each folder for a certain type of file and then run a macro that does a whole bunch of things to each file. Including saving the file as a different format in a folder with a similar but different name. Currently I have everything written except the loop that will go through each folder. I was kind of hoping to use a 2nd file search to do so.
I've only recently ventured into the VBA scripting and am finding it quite exciting. After doing some trivial stuff, I'm trying to work with websites. Currently, I'm trying to pull data off of a website which poses a form which has to be filled first. I've been successful in filling the form and clicking submit, through the code, but the site opens the results in a separate tab in IE. I am unable to make it go to that tab and copy-paste data from there.
Secondly, instead of just blindly copy pasting, it would be better if the data is pasted in a more readable format (as on the website). The following code is plainly copying and pasting the data as-is and hence rendering it unreadable:
I need a formula that can return the value from a cell in the same row it searches. The row is unsorted and has blank cells. Seacchs row A12:X12 returns the text in C4 (data validation List) in A19 on a different sheet.
I am trying to create an IF function that searches for the word "No." I have created a table with monthly payments and if the payment is >= 0, it returns the word Yes. If the payment is
Develop one system that can search and make changes on the user form. I already find the solution on my first worksheet(USER PROFILE) but when i used the same coding on my second worksheet(INVENTORY&RET), it doesnt work. Here is the example of my INVENTORY&RET worksheet example.xlsm
I am doing a spread sheet for participation in a class. What I want is for whenever a student is absent, i.e. has a 0 in their point box for the day, that cell turns red. I have tried to make the .find method work but it has been uncooperative and so far and I can't seem to get it to even run. This is what I have so far:
HTML Code:
Private Sub For_Loop_Click() Set v = .Find(0, LookIn:=xlValues) For Each v In [B6:B46] Do If v.Value = 0 Then v.Interior.ColorIndext = 3 Set c = .FindNext(c)
I've got a spreadsheet (sheet1) that has details of vehicles helpline numbers.
I want to create search box on a seperate spreadsheet, where the user enters a reg number, and it is searched for in sheet1. The row containing the result is then shown under the search box. Is there anyway to do this?
Also, I'd like to lock sheet1 so people dont see anything other than their search criteria. (ideally, I'd like sheet1 to be in a totally separate workbook).
im building a fairly intricate workbook at the minute but it is starting to slow down significantly lately as ive added more fromula's and sheets. I was hoping to make it even bigger but it looks like i might be stoped in my tracks. I have a reasonaby powerful computer and excel 2003. Does anyone know a way i could increase the capacity of this one particular workbook as it will be used by many people to enter data daily.
I have a web query that I would like to loop to a specified range. The catch is there are two possible outcomes. There is an outcome (data) and an outcome that is useless (no such page is found, etc). I'm kind of stuck trying to get this thing to loop. I would like to reference a range (contains links for input), and input all the data from the range, and based on the outcome, input the useful webpage data into the same spreadsheet.
I would like to have set of data as Parameter if possible.
Example: In Microsoft Queries I have two data sets. In first one shows let's say Item Number, and second one I should have table with components of all Item numbers listed in first table.
So first table I set one Parameter (?) and i get like 8 results. I would like that second table takes those 8 results (sometimes more or less then 8) as parameter and shows data (components) for them.
If I set sign '?' I can only select one cell as parameter, is there any way I can select multiple cells as parameter and use it like SQL function IN ?
Code: SELECT 1.ITMNR, 1.COMNR, 1.QTYPR FROM 1.1.1 1
WHERE 1.ITMNR IN ?
And second table should look for results in first table under 1.COMNR and select it as 2.ITMNR
Code: SELECT 2.ITMNR, 2.COMNR, 2.QTYPR FROM 1.1.2 2
I am looking for a formula that searches a range of data and then returns the sum of the numeric values in the adjacent cells. I have a calendar style spreadsheet with 2 columns for each day. In the first column it has a list of names and the second column a number.
I would like a cell to return the sum of the numeric values next to each name. All the names are entered into the columns randomly and are unorganised. The same name will appear multiple times in the range and have different numbers next to it each time. I am currently using (for example) =COUNTIF(H6:AL14,"bob") to tally up the number of "bobs" but really what i want to do is find a formula that in plain english does:
Search a range of columns and where cell = "bob" take the value of the adjacent cell (to the right) and total them up!
i have attached an image - i hope it makes sense what i'm trying to do - i would like Q3 to total up the numbers to the right of all "bobs" across all the days - so it should return 42
I am trying to fit a cooling graph with a trendline and I have found the power line to fit the best, as well as corresponding with Newton's law of cooling. However, I am not savvy enough to discuss how similar or dissimilar the two equations are!
the resulting equations from two different curves are as follows:
y=4305 x^-0.87733
y=4025 x^-0.91004
both fits have an R^2 of 0.996.
I am analyzing two scenarios of cooling the same object with three variables, one intended (the extraction of energy using water flow in one case, and no extraction in the other) and the others not under my control: different starting temperatures and different ambient temperatures. I need to understand if these are generally the same curve, or how very different are they? is there any statistical way to represent their relationship?
I am trying to write a routine (via two comboboxes) that will enable users to select a choice of charts from one of three possible worksheets and have the charts on the selected sheet copied to PowerPoint. My difficulties are these:
a. I cannot determine how to pass the selections to Excel (see b. as well)
b. In some instances my charts are actually groups of a chart and a picture. how I should reference these? They are obviously not ChartObjects: when I use the macro recorder all I get is a range.
I have a string of n pairs and want to check various combination of that string. Example: Pairs 58 78 15 Since I know I have 3 pairs (but it can be 2 or 4), I know the number of combination I want to test, ie 2 power 3 = 8 combinations. How can I program a code creating the various strings, ie 587815, 587851, 588715, 588751, 857815, 857851, 858715, 858751 ?
This is what I have so far (not much):
Public unique_pair 'number of pairs provided by another macro Public mystring 'provided by another macro Sub make_guess()
Dim number_of_combination, i number_of_combination = 0
number_of_combination = 2 ^ unique_pair For k = 1 To number_of_combination
I need to create a function which will take a objectname (a query or table) and a file name format
The objective is to export this query or table into multiple text files each with a maximum of 1000 lines per text file. These files are used as an input for SAP - the interface only takes a maximum of 1000 lines per file.
I am having three issues with the code below.
1. How do I split an excel query based on line numbers? Is there a way to get the equivalent of ROW_NUM in oracle ? Or do I have to loop through it and maintain a counter? 2. What is the best way to split the file ? Loop within loop? I need the files to be tab separated (no header required) 3.The rst.RecordCount is acting strange - when I pass a name of the query - the property returns the right no. of rows, however when I pass a any table name it only returns 1 - is this the expected behavior - or am I missing something
Code: Function ExportAsText(strObjectName As String, strFileName As String) As Long ' Purpose: Export any given query, table to mutliple files each of certain length ' the no. of lines per text file is defined by the config parameter SAP UPLOAD, LINE LIMIT PER TEXT FILE ' in the LKUP_CONFIG database
I am trying to query Active Directory for a list of user attributes by using a list of usernames and output the results into column B,C,D.....
All the usernames are listed in column A and it ranges from 100 to 1000 usernames.
The macro GetAdsProp works but it is very slow because it's a function and every time it gets called to return a value, it takes a long time to query. It will take forever to get 1000 users.
I've also tried the code below, however one of the AD attribute that I am querying for has a dash (i.e. test-address) and I can't put a dash in the vba code because it automatically puts spaces in between the dash and the text (see red text below) which will fail to find the attribute. Also, I need it to loop the whole column A and not just one account.
Sub LoadUserInfo() Dim x, objConnection, objCommand, objRecordSet, oUser, skip, disa Dim sht As Worksheet
' get domain Dim oRoot Set oRoot = GetObject("LDAP://rootDSE")