Querying Multiple Select Elements On Webpage?

Feb 27, 2014

I am trying to retrieve the "option" values and "inner text" from two dropdown lists on a website. Using the code below I can retrieve the data from the first list but the second dropdown is not populated until a value is selected in the first list.

Firstly, is it possible to specify a particular "select" element by using its "name" or "id" and if so how? Secondly, will I be able to populate the second list by looping through each of the values from the first list and retrieve the second list values each time?

I have been searching all day so far and cobbling together bits of code that I have found that do some but not all of the process I require.

[Code] .....

Below is a small section of the results so far. The second dropdown list will give the models based on the value selected in the first dropdown.

inner text value
Alfa Romeo 53
Aston Martin 69
Audi 16
Bentley 87
BMW 17
Chevrolet 77
Chrysler 54
Citroen 18
Dacia 92
Ferrari 95
Fiat 19
Ford 20
Honda 22

View 13 Replies


Querying And Relating Data From Multiple Sheets

Jun 6, 2008

I have a list of stores (A1:AX) and corresponding customer affinity numbers (B1:BX). Each time a customer visits a store with her affinity car, a record is generated. So the data is quite simple - two columns.

A sample of my list:


The tricky part (as always) is the output. I would like to divide the customers into three groups:those who visit only 1-3 stores
those who visit 4-7 stores
those who visit more than 8 stores

I would like to create a way to view a list of stores in column A and see how many of its customers are in each of the three groups listed above. Does that make sense? Output might be:

Multi-Store CustomersLowMediumHighPhl23188Det240322Nash123489Phl3498790

View 9 Replies View Related

How To Select Last 90 Elements In Filtered Column VBA

Dec 15, 2013

I have about 6000 rows of data in column A:G and growing

Column A is the key where i filter between a lot of duplicates

If i filter on X100000 there is about 432 elements (rows)
if i filter on Y100100 there is only 43 elements (rows)

The problem is i only want to copy the last up to 90 element to another sheet. I can copy all 432 rows to a second sheet and then copy last up to 90 rows thats what im doing now. And i am familiar with


But still cant figure out haw to do it directly in the filtered sheet.

View 4 Replies View Related

Using Macro VBA To Select From Dropbox On Webpage

Nov 4, 2013

The thing is I can open ie explorer and navigate to the page I need. What I'd like to do is be able to select from a drop box on the web page when it's already open is this at all possible.

View 1 Replies View Related

Mapping XML Elements To Multiple Cells

Nov 11, 2010

I am trying to produce an Excel file filled with data from the XML file.

Some of the cells need to have the same element data. However the Microsoft Excel is not allowing to map an XML element to more than one cells.

View 3 Replies View Related

Formula To Count Occurrences Of Multiple Elements Within A String

Oct 9, 2009

I have a number of records that have in one cell a string of the form 1,2,3 etc (up to 10) representing conditions that have been met. There are a number of options available for producing reports on all of the other attributes in a record but now we wish to add this element as well.

The reports I can produce using VBA and the INSTR function, however on the summary page where, a total of all records matching available criteria is shown, depending upon drop down items being selected, I need to add this element to the equation as well. The existing conditions are counted using SUMPRODUCT and a combination of IF statements and work fine.

As there is an option to create a report for both AND and OR, e.g. if condition 1 and 2 and 3 apply include in the report, or if condition 1 or 2 or 3 apply include in the report

The conditions are selected using a check box and a drop down list to select the AND/OR condition.

I have been trying various combinations of database functions, countif, find and cannot get them to evaluate. I suspect that it may be beyond my reach to use a formula and I will need to use VBA with a Worksheet_Change macro to achieve what I want, or alternatively redesign the layout to store the conditions differently, however if anyone has any ideas for a formula I would much appreciate hearing from you.

A sample worksheet illustrates how the data is currently shown. The string in the record column is created using VBA and then inserted into the actual record.

View 10 Replies View Related

Select File Upload File Using Vba From Webpage?

Aug 11, 2014

I have a project to import file into mysql through phpmyadmin, but every time I run the macro, I have to select the file manually. select the file using vba from the open file dialogbox.

here is the the html code:

HTML Code:
<div class="formelementrow"> <label for="input_import_file">Location of the text file</label> <input name="import_file" id="input_import_file" style="margin: 5px;" onchange="match_file(this.value);" type="file"> (Max: 125 kKiB)<input name="MAX_FILE_SIZE" type="hidden" value="127926272"> </div>

View 1 Replies View Related

Program Multiple Elements Of Multi Dimension Array Simultaneously

Aug 23, 2012

Is there any way to do this part of code without calling out each element individually?:

Dim aSequence(7, 1) As Integer
'setup Evaluation sequence
aSequence(0, 0) = -1


View 2 Replies View Related

Querying 2 Values And Returning The Sum Of A Third

Aug 13, 2009

I have used several IF and AND functions in the past in order to check to see if 2 values = true and return a third.

(for example =IF(AND(A1>10,B1<20),C1,"")

However I can't seem to figure out the senario below.

I have 2 coulmns, Column A has dates and Column B has a numeric value

I need to check to see if column A falls between 2 dates and returns the sum of column B

For example if have 100 rows and 10 of those rows have dates that fall between 06/01/09 and 07/01/09 then add up column b for those 10 rows and return the value.

View 3 Replies View Related

Querying Text Ranges

Apr 5, 2007

I've been racking my brain for hours over the past few days trying to compile a spreadsheet for work. Currently the spreadsheet covers all the aspects of a auto loan process. It is used as a tool for auditors to check the work of others. The spreadsheet simply uses "P" to designate "Pass" or "F" to designate "Fail" on whichever section.

How do I reference the P's and the F's in the spreadsheet? I've had trouble getting excel to query any text in cells. Also, each loan application is started on the next line, so I need to make sure these formulas repeat as a new line is started - how would I go about doing this? Currently - Cell G3-CG3 contain the "P's" or "F's" - the formula I had used was {=IF(G3<>"P","FAIL","PASS")} - which does work, on a single cell. However, if I try to add the entire range in {=IF(G3:CG3<>"P","FAIL","PASS")} the cell returns #VALUE. Obviously, I'm inexperienced with excel in this fashion, and I need to know what formula I should be using.

View 10 Replies View Related

Querying Date Range And Returning A Value?

Jul 28, 2014

I am trying to set up a query to search a date range within a table in one sheet based upon a more narrow date range in a second sheet AND return a simple count, median currency value or value based upon a ratio (see attachment).

Note: the Sale Price, List Price and Supply values will be based upon the filtered date range (each quarter) and return a value based upon that range. The Sale Price and List Price also need to be a median within each quarter value so I can chart the data.


Here is what I need to return:

Num Sales - simple count from each quarter

Num Listings - simple count from each quarter

Sales Price - median value within each queried date range

List Price - median value within each queried date range

Supply - numeric value based upon absorption rate, supply = listings each quarter / absorption rate (absorption rate = sales each quarter / months each quarter)

View 5 Replies View Related

Querying Baseball Stats From Espn

Apr 16, 2007

I'm struggling to find a way to index data in an array that meets certain matching criteria. I am looking for an employee's rate on a given day by searching a database that lists the dates that an employee's rate was changed. I was hoping to solve it with a crafty index and match array formula but have been unable to find something that works so far. I have attached a simplified example of what I am trying to do.

View 2 Replies View Related

Querying Data From Oracle Based On A Date(s) In Cell H1 (or H1 & H2).

Mar 19, 2008

I currently have an Excel file with the ODBC connection and using my own SQL. Doing it this way would require the super user to go into each sheet then to the SQL each time to change the dates. I know there is a way to allow them to simply change the dates in cells H1 (or H1 and H2) then refresh data and whoolaa it would be updated.

My goal if possible via this board and all the knowledge available would be to have a spreadsheet allowing a super user to change the date in Cells H1 and H1 & H2 on sheet Tst1 and have the data returned to sheets (Tst2, Tst3) based on my own SQL statements.

Here are some parameters that I think you might need to know.
(And as you may guess I do not have much VBA experience so if at all possible use my naming convention shown below. and feel free to write for a first grader.)

User Name (not actual): "UID"
Server (not actual): "DEV"
Password (not actual): "PWD"
File Name: Excel_ODBC.xls
Sheet Name: "Tst2"
Output Cell: "A1" for both sheets.
Oracle table name: UAB .................

View 9 Replies View Related

Select Multiple Cells Based On Multiple Criteria?

Sep 25, 2013

I would like a macro that select all cells based on multiple criteria. It's a big sheet, but I've made it smaller in the following example.

In row 1, there are 2 headers, in B1 (electricity) and C1 (gas) In column A, there are 3 houses, in A2, A6 and A10. The blocks of cells in between (e.g. B2:B5) have 2 headers, 'period' in B2, and 'account number' in B4. B3 and B5 have a list of options in them.

I want to select cells that meet certain criteria. Either electricity or gas, and either period or account number. So, if in cell D1 I choose electricity and in D2 period, I would like to select B3, B7 and B11. If I choose gas and account number, I wish to select C5, C9 and C13.

View 1 Replies View Related

Multiple Dropdown Select (multiple Columns)

Mar 4, 2009

I have VBA code below. Currently the code allows me in column "N" to choose more than one item in a dropdown menu. I am trying to find a way to make column K and M do the same thing. I have tried a number of ways but to no avail.

View 2 Replies View Related

VBA - Sum Of Variable Elements

Mar 13, 2009

I have a report as below:
Cust IDCust NameAcct 1Acct 2Acct 3…Acct 10…Acct 100Total123AB 123 255 663 - - 1,041 456AC - 3 833 51,008 - 51,844 157AD - 46 46 550 - 642 226FE 5 7,733 - - 553 8,291 658FZ 9 8,833 - 444 555 9,841

and would like to get the final product as following:

Cust IDCust NameAcct 1Acct 2Acct 3…Acct 10…Acct 100Total123AB 123 255 663 - - 1,041 456AC - 3 833 51,008 - 51,844 157AD - 46 46 550 - 642 226FE 5 7,733 - - 553 8,291 658FZ 9 8,833 - 444 555 9,841 Total Region 1 137 16,870 1,542 - 52,002 - 1,108 71,659


# of Rows are variables.
# of Columns are variables.
Sum amount for each of account including total per customer ID.
Total region line is hilited and bold.

View 9 Replies View Related

Get Elements From Web Page

Jan 8, 2009

Dim struserID As String
Dim strPassword As String
Dim strUploadFile As String
Dim strQueryURL As String
Dim objIE As SHDocVw.InternetExplorer
Dim htmlDoc As MSHTML.HTMLDocument
Dim htmlInput As MSHTML.HTMLInputElement
Dim htmlColl As MSHTML.IHTMLElementCollection

Set objIE = New SHDocVw.InternetExplorer
struserID = "xxxxxx"
strPassword = "abcdef"
strUploadFile = "C:Misc estupload.txt"

Code navigates to sign on page, enters userID and password, clicks on submit. The password used causes upload page to load. This all works ok. After upload page is loaded, the code does not enter either of the two following "for" routines.

View 8 Replies View Related

Write To A Webpage

Sep 1, 2007

I recived the small job of making a template for my company for travel. I had spare time so I added in a feature so they can just e-mail it to the approite person from clicking a command button intead of taking the time to click the built in excel e-mail function and typing the addresse.

Anyway, this from tells the person who it is being e-mail to, what flights to book.

I have differnt command buttons to bring up differnt airline webpages, bascially a hyperlink but in command button form. Is there a way, just because i have time, to take the flying dates from excel, input them into the webpage which the command brings up, and search for the flights for that date, just by clicking a button in excel?

I am using excel VB for the little code I have

View 9 Replies View Related

Search On A Webpage

Dec 14, 2009

I need a macro which opens a webpage, fills the search box with given value(from cell A1) and click the search button.

The macro I have now, opens the page. I need the rest. The webpage is something similar to google homepage.

View 9 Replies View Related

How To Extract HTML Elements

Jul 22, 2014

I have a few hundred of these divs, that I need sort and filter.

I would like to remove ALL HTML and be only left with the following:

Example Name = KeithEmail = keith@example.comStore = Store 1 (This only has 2 options. Store 1, Store 2)

All of the below code is in an individual single cell, so there are about 400 cells

HTML Code: 

<div userid=""286"">
<div id=""694"">
<h1 style=""display:none"">Keith</h1>


View 1 Replies View Related

Empty The All Elements In An Array

Dec 11, 2008

If I have say several hundred elements stored in an indexed array and I want to clear them each time the sub or function holding them is called, is there a way to erase the contents of the entire array without having to loop through each element.
Something like array().clear? Note that each time the sub is called, they are also redimed to some reference.

View 6 Replies View Related

Length Of Array With 100 Elements Possible?

Dec 23, 2008

I have a STRING array which is dimensioned with 100 elements possible. What i want to know is how to determine the "length" (not sure if this is the right word) of the array. For example: Suppose i have 10 strings in the array. Is there a command to determine that there are only 10 elements in the 100 possilble array?

View 11 Replies View Related

Add/Retrieve Elements From An Array

Apr 26, 2009

I can't seem to get my head around the simple issue of assigning a range of cell data to an array! Here is a snippet of what I have, maybe you can see the flaw:

View 8 Replies View Related

Count Elements In Array

Sep 8, 2009

I was wondering if there is a way to have the elements of an array counted. I have something like this:

View 6 Replies View Related

Accessing Elements Within Arrays

Nov 10, 2009

I've been teaching myself VBA for the purpose of processing some time resolved data from an instrument. I've come up against a problem and I just can't work out why the code is failing. (using excel 2007, VBA 6.5)

I declare some arrays as dynamic, then ReDim them to a user defined number (with Option Base 1) and input data from a spreadsheet into the array. I can then output the data into the spreadsheet again and the lbound and ubound functions return the correct values for the array. What I cannot do is actually access individual elements. If I specify array(i) I get the "Subscript is out of range" error. The code relevant to this problem is as below (simplified as there are more arrays):

View 5 Replies View Related

How To Find Top N Elements In A Range

Nov 3, 2011

I need to find top/bottom N elements in a range. I have created an array out of the range. I am not sure how to find the top/bottom elements? LARGE function would give me the actual value, however I am interested in finding the indexes.

View 3 Replies View Related

Removing Duplicates With Less Elements In A Row

Nov 22, 2011

Writing macro for "Removing duplicates with less elements in a row."

I am trying to remove duplicate entries from a file based on the number of data present in a row. Please see below

Name Col-1 Col-2 Col-3 Col-4
abc 1 3 4
abc 1 2 3 4
abc 1 4

I want to retain the row with maximum elements(row 2 in above eg.).

Result should be:

Name Col-1 Col-2 Col-3 Col-4
abc 1 2 3 4

Currently I am doing this manually, by adding countA at the end of each row, then arranging them in descending order. That will make sure that the row with more data comes first n hence gets retained, while other rows gets deleted.
Can this be done using Macro?

Below macro just deletes the rows,

Public Sub DeleteDuplicateRows()
Dim R As Long
Dim N As Long
Dim V As Variant
Dim Rng As Range

On Error GoTo EndMacro
Application.ScreenUpdating = False

[Code] .....

View 5 Replies View Related

VBA - How To List All Elements In Array

Jan 21, 2012

I have a question regarding arrays. If I have too many elements in a 1D array(let's say 1000), how can I list all of them in a msg box (separated by comma)?

View 2 Replies View Related

Retrieving Elements Of Array

May 14, 2013

I am facing the some issue while tried to display the data from array. Below is code I have to tried to display the data from array.

Scenario: I have assigned the few values in my excel to an array and tried to display the data stored in array

Sub Main()
Dim Rows_Array() As Variant
Dim i As Integer,
Rows_Array = Range("C6:C" & Range("C65536").End(xlUp).Row).Value
For i = 1 To UBound(Rows_Array())
MsgBox Rows_Array(i)
End Sub

View 1 Replies View Related

Find Unique Elements

Nov 19, 2008

I have a column with serial numbers, i want to go through that column and store all the unique serial numbers and the number of occurrences. then i want to know what is the highest occurrence.

View 9 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved