Capture External Data Refresh Date & Time
May 29, 2008In the Data tab under Connection Properties, I have "Refresh every x minutes" checked. Question is how do I capture in a cell within a sheet the last time it was refreshed?
View 2 RepliesIn the Data tab under Connection Properties, I have "Refresh every x minutes" checked. Question is how do I capture in a cell within a sheet the last time it was refreshed?
View 2 RepliesI have an excel table that connects to an external sharepoint site.
When I refresh (via external data connection), the "start date" and "end date" column formats change. The only way I can correct this is to copy those columns to notepad, and then paste them back into the spreadsheet.
I have several calculated cells based upon these date fields. Once refreshed, the data is incorrect until I copy and paste those dates as stated above.
This removes the functionality of simply "refreshing" the data resulting in a manual process.
I am having some issues using 'refresh all' to update my excel spreadsheet. Basically, it doens't seem to like doing anything greater than 65 queries before it gives me the error "Too many client tasks".
I've written a macro that updates all spreadsheets seperately, but this takes forever (I have approximately 250 worksheets within this workbook). Is there a way to speed this up? I believe the most time consuming part is establishing the connection to the access database. Is there a way to establish the connection to a database, and keep it open until all data has been updated?
Below is the code I am using:
Sub RefreshAll()
Dim e As Double
Dim sht As String
e = 1
Application.ScreenUpdating = False
Do
Sheets("All ESNs").Select
Cells(e, 1).Select
sht = ActiveCell.Value
Sheets(sht).Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("All ESNs").Select
e = e + 1
Loop Until IsEmpty(ActiveCell)
Application.ScreenUpdating = True
End Sub
"All ESNs" refers to a worksheet that contains a list of all serial numbers. These serial numbers correspond to the worksheet names.
I am trying to set up a button that can be used to refresh data from an external source. The problem is that I'm not sure what to put in the area that I am using the "query" variable
Sub refresh_data(ByVal WS As Worksheet, query As String)
Application.DisplayAlerts = False
Sheets(WS).QueryTable(query).Refresh
Application.DisplayAlerts = True
End Sub
what i end up getting is an error saying basically that I am using incorrect data.
I am using an Excel file (Raw.xlsx) to store my raw data, and take another Excel file (Pivot.xlsx) to make PivotTable from Raw.xlsx
When generating the PivotTable, every works fine. When click [Refresh] in the Raw.xlsx, whatever changes been made in the Raw.xlsx can "sync" to the Pivot.xlsx
However, once I save and reopen the Pivot.xlsx, I can't refresh the PivotTable anymore. I've tried changing Data Source, but it doesn't work.
I have a pivot table report connected to an external data source (OLAP cube).I want to automatically refresh the pivot table report everytime the OLAP cube data changes.
I know we can use Automatic refresh on open of workbook or time intervals after which to refresh .But i want the auto refresh to work even if the workbook is already open and there is no definite time interval after which the cube is likely to change.SO,by defining intervals for auto refresh i do not intend to waste time refreshing even if there is no change.
There are multiple pivot table reports and pivot charts connected to the same OLAP cube.
I have a spreadsheet which has 3 separate external queries running from worksheet 'A'. My user enters a couple of dates in another worksheet 'B' to supply the date parameters for the query and a macro runs to refresh all of the queries and performs a few calculations.This works fine. The trouble is I don't want the user to be able to view all the data on sheet 'A' only the summary on B. My macro ends up on sheet B but whilst the query is refreshing the raw data is displayed to the user on sheet 'A'. When I hide the sheet 'A' i get a run time error '1004' Select method of worksheet class failed.
View 4 Replies View RelatedAssuming I have three worksheets:
1) input: col A has a series of product code (string)
2) calculation: where I want to automatically copy and paste each product code from "input" worksheet into "calculation" cell B4, and through many steps of calculations, return the outputs in cell B8 and B9 (parameters are numeric)
3) output: how to automatically record B8 and B9 from "calculation" sheet to this sheet Row 5 and 6 from each loop? (format of output doesn't really matters)
Trying to capture data from specific fields (which are populated with live data collected elsewhere) into new fields based on date. Ex:
A1 - A4 have "totals" derived from an external source, and the fluctuate daily.
I want to take today's totals and drop them into D1 - D4. Tomorrow, I want totals dumped into E1 - E4, the next day they go into F 1- F4, and so on... in other words, I'm tracking daily totals over time.
I've started with a macro that I would attach to BeforeSave as follows--
I have loaded a .csv file in which the first column contains date/times, e.g. 01/12/2012 00:00. How do I now tell Excel (2010) that this is in fact a date/time format? If I select one or more of the cells, click on the Number dialog box launcher and try to pick a suitable format tghe cells resolutely refuse to budge from being text (i.e. left-justified, still allows me to edit the 'seconds' component to a number > 60). Also which data type should I be using? The only one that appears to have a full date/time format listed is Custom (not Date or Time).
View 4 Replies View RelatedI am preparing a template on the con-call done with various states. What I want to do is to capture their log in time to the call.
1) As soon as participants log in, we need to input the time of that moment. Click or double click with the cell should give me the current time.
Then;
2) Need to calculate how many participants, logged in to the call On-time by considering the log in time captured.
3) Similarly, we need to count the participants joined within 10 minutes of call and who are late comers.
i have an excel spreadsheet with 27 or so workeets. it contains sales figures in it.
I want to be able to link mutiple cells of this workbook to another workbook so that it retreives that data, So that when I hit the refresh (!) button it will automatically put the data in. I will recieve new sales figures (new files) on a monthly basis so i want it to be able to update the figures to the new figures.
I have created a break tracker where i have to key in time manually. What i want is to click the desired label field and there will a button next to it which will deliver system time on that particular field while i will click on it. And i also want a working button for date as well. 2 separate button 1 for time and 1 for date.
View 7 Replies View RelatedI am looking for a macros VBA where a user insert or update a data the date and time should be insert in column I and save the workbook.
Note: If the column I already have the date and time inserted before then it should give message record already have date and time.
I am using office 2010.
I am looking for a formula to capture the "date" of my first sale to new customers.
A B C D E F G H Date of first sale
1 Co. Name 2/2/2012 6/5/2012 7/6/2012 10/16/2012 1/22/2013 4/17/2013
2 ABC Co. $10 $11 $5 $12 $12 2/2/2012
3 Smith Co. $19 1/22/2013
4 Brown Co. $11 $15 6/5/2012
5 AAA Co. $5 $10 7/6/2012
I have a date in cell A1, eg 21/02/2008 being 21st Feb 2008 (yes i'm a pommie/limie)
This shows as a date in excel, but if I format the cell as a number, excel will display 39499
So Far, So Good.
Now, I wish the date format to remain in excel, but I wish my script to capture the number as 39499
Unfortunately it captures it as "21/02/2008".
How can I convert the captured value of "21/02/2008" to my desired value of "39499"
And be correct for any date encountered (within plus or minus 10 years only)
Im trying to capture the first instance of a value(ie 1) and reflect the top row of the value (date). I cant seem to make Hlookup work. I got it to work on the first line using index and match, but when i tried to copy it on the succeeding cells, it gives me the wrong data.
I also tried the following
StartedDate started1-Dec2-Dec3-Dec4-Dec5-Dec6-Dec7-Dec8-Dec9-Dec10-Dec
aaaaaaayes12/1/200911
bbbbbbyes1/0/1900111
b2b2b2b2b2b2no
ccccccccyes111
I am trying to capture the date at which my portfolio was at it's highest. I enter the value of my portfolio in H35. F36 is where I am trying to capture the date at which my portfolio was the highest. If a previous date was higher, leave as is.
This presents a problem of a circular reference, but do not know a way around this.
I have the following formula in F36
=IF(H35>G36,(F37),(F36))
In F37 is todays date
G36
=IF(G36<=H35,(H35),(G36))
H35 is value of my portfolio today
I'm working on a monster file having a RAW DATA sheet, analysis sheets and a summary sheet which "milks" the relevant outputs into the preset table’s presentation. The point is the Milking is "alive" and not "copy/paste" like such that any new analysis is immediately summarized. It's only an 8M file but it freezes for "computing cells" every 20-30 second for about 30 seconds. This has a good potential for driving a person crazy. Any idea why is it so slow? Any way to set the update-time to longer time intervals or to update only cells which origin has been changed lately?
View 3 Replies View RelatedIn cell B9 I have a simple Time formula which can be refreshed manually through F9.
Would like a code that automatically refreshes the time every 30 seconds, if that is possible.
I was looking for a way to get external file froperties into a cell!
for example:
Last modified date.
this is what I allready found/tried.
I am attempting to pick up a date with time entry on a worksheet and place it into a TextBox on a UserForm. Format on the sheet is mm/dd/yyyy h:mm AM/PM. The UserForm is placing the value as mm/dd/yyyy 12:00 AM. here is the
Private Sub UserForm_Initialize()
If Not Range("dDate").Value = "" Then
TextBox2.Value = Range("dDate").Value
TextBox2.Text = Format(DateValue(TextBox2.Text), "mm/dd/yy h:mm AM/PM")
Else
TextBox2.Value = ""
TextBox2.SetFocus
End If
End Sub
"dDate" is the named range where the date is sitting. The format is also set on the TextBox2 exit event. Can anyone see why only the date portion is being transfered with the default 12:00 AM for no time component of the value?
I have streaming data coming into my excel spreadsheet. The data is in 1 cell and its a number that changes almost every second. How can I capture and store this data.
View 1 Replies View RelatedI need to find a term "aa" and upon finding this term, the term on the right must be "bb" before we capture the number. Output will be 15 for this case.
Note that we do not know which cell "aa" will occur in, but the term "bb" will always be on the right of "aa". Can anybody help me with this? I have attached an example for your reference. Hopfully by modifying the below code, i can get the value i desired.
Sub test2()
Dim xx As Variant
Set rng = Cells.Find(What:="aa" , After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
True)
If Not rng Is Nothing Then xx = rng.Offset(0, 3).Value
MsgBox xx
If rng Is Nothing Then xx = 0
MsgBox xx
End Sub
Need to create Working order (in Excel 2007) for filling machine in my factory. Working order is changeable from day to day and the deference is product quantity. Product quantity in working order [File - Working order] is changing according to the each sales plan [7-Jan-13, 8-Jan-13] - (File Working order is Linked to the appropriate sales plan in this case - [7-Jan-13]).
Anyway, I need to change the source workbook "sales plan" from [7-Jan-13] to [8-Jan-13] by changing source workbook name in red cell [File - Working order] and not to browsing location?
All source workbooks [sales plan 7-Jan-13, 8-Jan-13]are at the same location in the same folder, only difference is the source workbook names. So, is it possible to change source workbook name (File - Working order - red cell) for all external references (File - Working order - green cells) at the same time, and avoid annoying browsing?
I have a moving average spreadsheet that I am having trouble with. In column F of 'Data for Pivot' Tab, I have a set of data that doesn't begin populating until 101 data points (cell C8 in 'Mov_Avg_Chart' is the input; in this cell F138 of 'Data for Pivot' tab) after data begins populating in Column E of 'Data for Pivot' Tab (in this case data begins populating in Column E in row 38).
What I would like to do is have the data in cells F38 to F137 = the value in cell F138. From there on forward (cells F138 and onwards), I would like the formula to calculate data in the same way as it is currently calculating it. That is, I would like the values in cells F38 to F137 be 0.00110 (in the current example). However, the data will be constantly changing. Thus, sometimes the data in column F will begin at a different cell than cell F138. In essence, I want the formula: when column E begins populating data but column F has not, I want those column F values to equal the value of the first populated value in column F (which is usually numerous cells below this value).
I just can't seem to get this one right after spending considerable time on it. I would appreciate any help you can give on this.
I have an excel file with column stating month and rows are phases ... for each Phases we add the revenue numbers by month and it does keep changes as and when scope changes. However, i am finding it difficult to capture the changes ... is there a way i can set the guidelines to ensure all historical data changes as and when any updates and it should store the historic inputs for consolidation ... i would like to be called as Baseline, Re-baseline1, Re-beseline2 like wise.
Sample attached : sample_auditing.xlsx‎
how data capturing works, using controls. I try to explain what I mean. I have a userform with a combobox that allows to select data from a worksheet in another workbook (database). Using VBA, I'm asked to define the "source" for the combobox. I don't understand the difference between controlsource and row source because when I close the userform, I find only the first field filled in (column "A"), while I would like the entire row to be copied.I also would like to have an "ok" button to allow me for multiple selection. In other words:
I select the desired data from the combobox
I click on the "ok" button ahd this event should copy the data (entire row) selected via the combobox on my worksheet without closing the userform in order to allow me to select other data on the same session. The row to copy data into is selected using the firstemptyrow method..
I have a list that show file names and when the necessary works on these files were completed, but the powers that be want more. I have been asked to add two more columns, one showing when the file was last opened and the other when it was last modified.
Is it possible to do this through VBA without having to open the files that are listed? If so I will run the macro when the workbook is first opened.
I have a query with ODBC connection to a SQL database. This query's parameter is linked to a cell. The resultant data is the source for a pivot table. I want to refresh the pivot table, when the query is run. I've tried using the cell that triggers the query....but the problem is that the query takes about 10 seconds to run. By the time the query returns new data....the pivot has already refreshed. I need it to refresh AFTER the query is complete.
I tried adding a cell that sums up the data from the query...thinking when THAT changes (due to updated data), to trigger the pivot refresh. Problem is that I don't know the trigger for when the sum cell changes (ie....formula change, not typed in.)