Dynamic Web Query Using Values In Cell
Jun 24, 2009
Hey guys i really need your help with this one.
Basically I have a web query. In this web query the url has a part which changes to direct it to a different page with similar formatted data.
These variables that change are all in column A of my excel sheet.
So say it was http://www.google.com/search?hl=en&q=*VARIABLE*
and Variable changes according to the cell value in A1, A2 etc etc.
Right so say i set up a macro to get the data from the website, and i do some stuff to this data e.g. cop and paste it to B1. I need it to automatically change the urls variable to that of the cells below and then do the copy and pasting to the cell below (B2) it copy and pasted before(B1). Then again it change (the variable at the end of the url) to the value of Cell A3 and after its obtained that data copy and paste it below B3
Im not great with vb, like i can understand it if its infront of me but at this stage i cant write it.
Im guessing though i have to use like a counter that increases makes the variable pick it from the cell below.
Oh and i need it to stop at say when the variable reaches cell A360.
View 11 Replies
ADVERTISEMENT
Oct 10, 2007
web query parameters. This is what my .iqy file looks like: ...
View 9 Replies
View Related
Jul 28, 2008
I m trying to make a query based on a dynamic range and paste the results in a sheettab of my wrorkbook.
View 9 Replies
View Related
Mar 29, 2007
Need the query parameters which takes the date from the cell into the query. How should I modify my query if it needs to take the date from a cell?? The bold one date should be picked from one of the cell in sheet 2.
My query is this
WEB
1
http://fc-web-phl1-101.phl1:8090/gp/...runReport.y=12
Selection=15
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False
View 2 Replies
View Related
Oct 21, 2009
I basically have this worksheet which has Cell D3 Being Dynamic. It puts the lowest cost supplier from columns H:W. If i change the prices in H:W it will bring up the lowest cost supplier in D3. Once D3 is chosen i want it to self populate F3 and G3 based off of what is in D3. This data should be pulled off from what is in the H:W columnns corresponding to the supplier in D3.
View 3 Replies
View Related
Jan 6, 2010
In the attached file the
„«All the data is available in the details sheet
„«Input field is B20.
„«There are 6 Rate Schemes. All the input fields are present in all
„«Again there are 3 Subline of Business
Need .. when I put a input field and select a C15 and C17 the Exposure Curve, Flexa, Other should get displayed.
Hope I made the scenario understandable.
View 2 Replies
View Related
Dec 9, 2013
I used a posted code to copy web query data from sheet2 to sheet1. Then a friend modified the code in order to Copy it to a new row in Sheet1 instead of a new column. The code works perfectly but I really wish that when the data is copied from Sheet2 to Sheet1 it will be only Values in order to keep my formulas and formats.
I read about .PasteSpecial xlPasteValues but I don't seem to find where exactly I should write it within the code.
View 1 Replies
View Related
Feb 13, 2007
I have two cells whose values gets updated every minute using a Web Query.
1. Stock Price
2. Time
I would like to create a Line Chart with these two cells. The chart needs to plot and update automatically for every updated value received.
Since i dont have a range of data i have difficulties in setting up the chart.
View 5 Replies
View Related
Apr 8, 2009
I'm tracking weeks by weeknumber in the format YY-WW. At the moment I am entering the weeks manually in a general cell, preceeded by a '. I would prefer to have the sheet work out the weeks for me as we move the sheet every week. I would like to format the initial cell as follows:
09-08 (or '09-08 if I must)
then have the next cell in sequence read 09-09, 09-10, and so on. With the initial week in cell A3, I have tried to accomplish this with:
=LEFT(A3,3)&RIGHT(A3,2)+1
However, this does not work for weeks 01 through 09 because excel kills the leading zero in the second part of the formula, regardless of how I format the cell (format 00-00 does not work.) How can I force Excel it to keep the leading zero in the week number?
View 5 Replies
View Related
Nov 2, 2005
I have a spreadsheet with a pivot table that is based on a table within an SQL Server database. Every month a stored procedure is run creating a new table. Using the pivot table wizard I can modify the underlying query to access the new table. The pivot table functions properly with the new data.
I also have a macro that I created that will cycle through all the combinations of page field pivot item values, setting the page field currentpage, do some calculations, and save the results.
This is bombing because it seems that some old date values from the previous month's table are still in the pivot items and when my macro attempts to set the page field's currentpage to one of these values it generates Run-time error '1004' Unable to set the _Default property of the PivotItem class.
I have tried putting a pivotcache.refresh in but that doesn't seem to help.
View 3 Replies
View Related
Jul 18, 2006
I am trying to count the occurences of combinations within a range defined by contiguous cell values in one column. My problem lies with setting the value of variables that are queried within the defined range. My macro should;
1)Set ComboValue1 & ComboValue2 values to A1 & B1 cells values respectively
2)define range to be searched by how many contiguous values there are in column D
3)search column E for 2 figure combination (defined by A1 & B1). If present increment counter by 1 and add to column C (to be visible in worksheet). If no match carry on
4)define new range by next set of contiguous values in column C
5) step 3
6)when all possible contiguous ranges defined and searched from column c, perform again on next combination down columns A & B with refreshed occurence counter
7)finish when all combinations are searched for
Sub CountComboOccurence()
Dim ListCounter As String
Dim ProgCounter As String
Dim Counter As Integer
Dim ComboValue1 As String
Dim ComboValue2 As String
Dim Rng As Range
Application. ScreenUpdating = False
ListCounter = 0
ProgCounter = 0
Counter = 0
ComboValue1 = 0.......................
View 2 Replies
View Related
Dec 20, 2011
Using MS Query in Excel, I've created a simple query that pulls its records from an SQL dbase. Here's the statement:
SELECT uvVisit.FacilityListName, uvVisit.DoctorListName, uvVisit.Date, uvVisit.PatientVisitId, uvVisit.PatientLast, uvVisit.PatientFirst
FROM CPS.dbo.uvVisit uvVisit
WHERE (uvVisit.Date Between ? And ?)
ORDER BY uvVisit.FacilityListName
The query runs fine and prompts the user to enter beginning & ending date ranges for the visit date when executed. So far...so good...but, this requires me to manually insert a line in Excel above the 1st record and type in something like: "For Date Range: MM/DD/YYY - MM/DD/YY" to denote the date range that the qualified records fall into (something the user wants to see).
However, I'd like to find a way automatically preface and display in the report's output (perhaps as the 1st line of the report in Excel??) something similar to what I'm already typing, and have it pull the beginning and ending MM/DD/YY values from those supplied by the user in the parameter.
View 3 Replies
View Related
Nov 26, 2012
I have an MS Access query that contains a parameter. The parameter is a date field, and I have configured that in the Access query. If I run the query within the MS Access user interface, it prompts me for the paramater value as expected, and runs just fine. However, I want to connect to this query from within Excel as a data source.
I have created a connection to the Access file using ODBC from within Excel. In the MS Query window, I am merely selecting all of the fields resident in the MS Access query, and returning all values. In other words, there is no selection criteria in the MS Query. I have done this many times with Access queries that DO NOT contain a parameter, and everything works fine. However, in this instance, I need to pass a parameter through to MS Access in order for the query to run. At the moment, I get the "Too Few Paramaters...1 expected" error message. This makes sense, because I haven't figured out how to pass the paramater to MS Access.
Is there a way to structure this that does not involve VB code? If so, I'd love to know how. I have tried creating parameters in MS-Query with the same name, but although I get the prompt it doesn't connect with the Access query as the source for the parameter value.
If the solution requires using code, I'm good with VB Code in Excel...is there VB for Excel code that could make this happen?
Failing that, I guess there must be (I've seen a few in my search thus far) Access VB Code that can make this work. I'm very rusty using VB with Access, so this is my least favored solution. However, if this is the only option, keep in mind that I need to pass the paramater ultimately from a user who will initiate the process using Excel.
View 3 Replies
View Related
Nov 12, 2009
Is it possible to get Dynamic Values in a Msg Box
I want a Msg Box which will show different values each time upon selection of a different items in a Dropdown...
I have a Dropdown which has different values in it and the tentative price of each Item in the next column...
Now I want to use some kind of VLOOKUP as well but in VBA Format...
Example:
Col A-------Col B-----------------Col C
Sr.No-----Expense List------------Tentative Price
1------------Internet Charges--------500
2------------Newspaper Charges------400
3------------Milkman Charges---------1684
4------------Sundry Expenses---------?
5------------House Maintenance------1500
6------------Electricity Bill------------?
7------------Telephone Bill------------?
Now this is an Expense List present in Sheet 2 and In Sheet 1 Cell F5 I would have a Dropdown where I would be Selecting the Items from Column B
i.e $B$2:$B$8 I want the Msg Box to display the tentative price of each selection present in the column C...I know I can use Vlookup and Show but I want to make it user-friendly and not have to many cells occupied with formulas as the MSg Box will display the price but I still would be manually entering the Price.
View 4 Replies
View Related
Sep 6, 2008
I have a csv file on another drive on the network that i need to query. I believe that ms query would be the best way. I know that a DSN needs to be setup but this macro will be used by various users who wont know how to do that. thus I would like to create one via VBA every time the task needs to be run.
I haven't a clue how to do this and i need it to be explained to me in general terms with words of one syllable!
View 9 Replies
View Related
Mar 26, 2014
The values in Cells D1, D2 and D3 are user inputs.
A formula in B16 should sum values in database (ie sum of B6 to B11)
Example :
A
B
C
D
E
1
Enter the column no
B
2
Enter the start row no
6
[code]......
Result
149
View 1 Replies
View Related
May 16, 2014
Presently I calculate a worksheet and store the result in any array the size of which is determined at the start. I then enter all the results in a worksheet and get the max and min values and numerous other data. I am trying to find a way to get the max and min values without having to enter the data to speed the routine up.
this is the code that puts the results into a worksheet.
Code:
Sub Recalculate() 'Recalculates the WorkBook
Dim Calc_
Worksheets(startSht).Select
Set Output = Application.InputBox(prompt:="Please select the 1st Output Range.", Title:="SPECIFY RANGE", Type:=8)
Set OutPutLabel = Application.InputBox(prompt:="Please select Label for
[Code]....
View 1 Replies
View Related
Jan 5, 2008
Say there are two changing values in a spreadsheet: A row reference, and a column reference, called sRow and sCol.
sRow and sCol are integers, and they are also changing values.
I want to know how to find how many cells have something in them on row R, starting from column C to infinity (To the right). But the problem is that R and C change sometimes, so I have to make some sort of dynamic CountA formula.
I know I have to use CountA() to do this, but I don't know how to make the range reference just from two integers. What I have tried so far is CountA($sCol$sRow:$sRow), but this does not work. How do I properly format this formula?
View 9 Replies
View Related
Mar 2, 2014
I'm trying to reference text from one worksheet to another. The data is all in column A on the "Template" worksheet, however the row varies (ie starts at row 5, then 7 the 9 etc). The cell row is always +2 rows on the previous row, and column A.
What can I use to pull across the cells with the information that I want, onto the "Report" worksheet?
View 3 Replies
View Related
Jul 20, 2009
I would like to create a dynamic range based on a cell value. However, the cell reference may vary because the numbers of entries in the workbook can vary.
In addition to that, after the first range (eg. A1:A10), I would like to create a second range after the first (eg. A11:A20).
View 2 Replies
View Related
Nov 5, 2009
I am trying to find unique values on one page and copy/paste them on another page (all within one workbook). I tried to use advanced filter, but ran on some problems: i) it does not copy values on to the new page ii) it is not dynamic.
my information is entered on a daily basis, which is why I need the filter (or code) to be dynamic. The information, however, is not stored, but rather generates a daily invoice, this is why I want find only unique values to appear on a new page (invoice).
View 10 Replies
View Related
Dec 3, 2011
I am trying to make a chart based on the following values (for example) The X axis values are week numbers, the chart X axis must stop at Week 4, the data range still contains all these cells, but the chart will only show cells with values, If i'll put a value in Week 5, the chart will auto-expand itself to include week 5 too.
Code:
Week # | Value
Week 1 | 1
Week 2 | 2
Week 3 | 3
Week 4 | 4
Week 5 |
Week 6 |
View 3 Replies
View Related
Feb 7, 2013
How can I retrieve the values from a dynamic named range with VBA?
Let's say we have created a dynamic list with the OFFSET function, how can I get the values of that dynamic range?
View 9 Replies
View Related
Sep 29, 2011
I am using Excel 2007. I have a table with department names and the number of employees in each department. Currently, I'm using the formula :
=SUM(C12,C16,C20,C24,C28,C32,C36,C40,C44)
However, if another section is added to the database I have to update each formula. I'm looking for a way to get my totals no matter how many sections I add to the table.
View 4 Replies
View Related
Sep 26, 2007
I have over 5000 cells of data. I want to take 4 data points at a time, average them then plot them on a dynamic chart. I know how to do the dynamic chart but how can I take the average of the the first 4 numbers store it in a different cell, then the next 4 and so on...
View 4 Replies
View Related
Jul 8, 2008
I'm trying to query a query in Access 2003, from Excel 2003.
The query in Access looks like:
AccessQuery: [SELECT VBAFunction(field1) FROM Table]
The query in Excel looks like:
ExcelQuery: [SELECT * FROM AccessQuery]
I use the following VBA code in Excel to excecute the query:
With ThisWorkbook.Worksheets(cDataSheetName).QueryTables.Add(Connection:=strConnection, _
Destination:=ThisWorkbook.Worksheets(cDataSheetName).Range("A1"), Sql:=strQuery)
.RowNumbers = True
.Refresh BackgroundQuery:=False
iResultRowCount = .ResultRange.Rows.Count
End With
When I execute this code I get the error message 'SQL Syntax Error' (Error 1004). When I remove the VBA function from the query in Access, it all works fine.
View 9 Replies
View Related
Apr 25, 2006
I created an Ms Excel Database Query to bring in data from MS Access. (versions 2002 of MS Excel and Ms Access). The query works fine initially. I can right click, choose Edit Query and change my criteria. Results are returned almost instantly.
My problem is that, once I save the workbook, or autosave happens, I get an error when I right-click to Edit Query: This query cannot be edited by the Query Wizard..
View 2 Replies
View Related
Aug 1, 2013
I need to find average of the values , the count of the cells will be dynamic (may be 5 or even 200).
View 2 Replies
View Related
Apr 24, 2014
Is it possible to have a dependent validation drop box that under certain conditions automatically produces an actual value in the cell instead of a drop-down list to choose from? For example, if I choose “Holy Avenger” in the first drop box, and the value for that choice in the second drop box is always a “2”, can you get it to auto-populate in the cell occupied by that 2nd drop box (cell B5 in the attachment)? Or, are you restricted to using Lists only, meaning that you could create a List that only has the value “2” in it, and the user would be required to choose the “2” in the drop box?
View 2 Replies
View Related
Feb 4, 2010
I am setting up a questionnaire which needs to be dynamic. The questions in the questionnaire are pulled from a 'baseline sheet' using check boxes and an if statement, i.e. each question in the baseline sheet has a tickbox next to it, and if it is checked then the question is populated into the questionnaire sheet.
Im wondering if there anyway for the worksheet to populate the input cell with the next cell value from the baseline sheet if the first is blank? So if a box is not ticked, it will intelligently seek out the next box that has been ticked and retrieve that value. Essentially, my goal is to not have any blank spaces in the questionnaire which is what is happening now.
View 4 Replies
View Related