Our company's accounting system is physically split into 2 company databases, CompanyA and CompanyB. I'm trying to write a query which will pull the customer number and the accounts receivable balances from both companies into a single Excel table, for any customer with a total balance 0.
I have created the following query, which doesn't generate any errors, but is only successfully importing the data from the first company.
I tried to import web data from a textarea (look at example2.jpg) into excel and it always end up squeezing all the information into one single cell(spreadsheet.jpg).
I am trying to find a way to edit the imported data which is similiar to paste special or extract the information from the cell into a table, but I seem to waste a lot of time on this and going no where.
I'm Importing Columns from one sheet to another in the same workbook. imports good But:
1- Some columns with first records/rows blank do not import at all.
2- I have a column with some letter/numbers combinations and single numbers at times. Those single numbers are not imported. And half my data in that column are single numbers.
Convert data to proper for columns- E, Z and ADConvert data to upper for columns- A, I, X and ACHighlight Special characters with cell colour as Red for (!@#$%^&*:”<>+_’;\/?`~-)Find & replace % in the current sheet with blank.ran.
attached is a spreadsheet 6 people in my area use daily(ive copied and pasted the sheet in question to a new worksheet, as the file was too big). Ive been trying for about 3 days now to make a pivot table to summarise this data.
the attachment is a sample spreadsheet of what i am trying to do. I would like to create a pivot table so that for each site I can list all of the organic suites individually. Then show a count of only 1 for each site, even when there are several counts for each site. And then for this to be related to a cost of each of the suites so that I can get a total cost for each site.
eg:
site name
organic suites suite cost o1 x o2 y o3 z Total A etc
I am having a excel vba code that copies tab from different excel file and then i want to use in sql query. It is always giving me error saying that "The Microsoft Access database engine could not find the object 'rahul'. Make sure the object exists and that you spell its name and the path name correctly. If 'rahul' is not a local object, check your network connection or contact the server administrator."
Though, when i rerun the macro after reopening the excel file, it is working fine. Seems like tabs dynamically created cant be used. Is their any way to get it done at runtime? I want to delete new created tab once data from new tab is inserted to required tab.
my macro calls first copyAllSheets(filename) and then writeSheet().
Code:
Private Function copyAllSheets(ByVal fname) Dim destSheetCount As Integer Const FUNCNAME = "copyAllSheets" On Error GoTo ErrorHandler Set wb = Workbooks.Open(fname) destSheetCount = ThisWorkbook.Worksheets.Count + 1 wb.Worksheets("Buyer").Copy after:=ThisWorkbook.Sheets(1) ThisWorkbook.Worksheets(destSheetCount).Name = "impBuyer"
[code]........
This is part of code so probably it wont be easy to understand the flow. but mainly i want to know how can i have newly created tab as table_name.
I've used this code prior and it worked fine in Excel 2007, now I'm having issues with it. Originally every Pivottable & Query pointed to a different CSV file. Now I have two pivottables built off a Excel worksheet that is built from a Query. This allows me to do some complex lookups that I couldn't do with just the Pivottable and MS Query alone.
Here's the code that's failing out: Any problems with it in Excel 2007?
Private Sub Update_All_Data_Click() Dim pvt As PivotTable Dim ws As Worksheet Dim qt As QueryTable
mytitle = "This will refresh all data for validation, are you sure?" Msg = "The Refresh process takes about 5 minutes, are you sure you want to continue?" Response = MsgBox(Msg, vbExclamation + vbYesNo, mytitle) Select Case Response Case Is = vbYes ' Do Nothing, continue with program Case Is = vbNo Worksheets("instructions").Range("a1").Select End End Select
For Each ws In ThisWorkbook.Worksheets For Each qt In ws.QueryTables qt.BackgroundQuery = True qt.Refresh Next qt Next ws
For Each ws In ActiveWorkbook.Worksheets For Each pvt In ws.PivotTables pvt.RefreshTable Next pvt Next ws
mytitle = "Confirmation of data refresh" Msg = "The data has been refreshed" Response = MsgBox(Msg, vbExclamation, mytitle)
When going through the Web Query in Excel and pulling data with the above address. I get the option to pull the data from the products table..the table with the code/name/product group/sub group..etc etc...
But when I launch the query, it doesn't pull the table data..I get everything but the product list.
I use web query to get some range of data. This data is refresing and changing on some time (i set query refresh on 1 minute). So, i'd like to fetch this data and make the table with all data (new data on eg. every 1 minute). How to do this? I use Excel 2003.
I run a web query to populate a table in my spreadsheet. The data is dynamic - and on some days, I will get a couple of extra rows in the table (its weather data, so e.g. when its raining, they will forecast an extra row of how many mm, etc...)
To give a simple example, right now I use Hlookup to locate the value of F3 (the date) in my dynamic range of B26:G26 and step down 3 rows, where my needed temperature values are for that corresponding day. This works great like this already: =HLOOKUP(F3,B26:G29,3,FALSE)
The big issue is...what happens if my target values are not always 3 rows down? If the query refreshes with any extra rows, this reference is shifted. (Well, my starting "Anchor" is shifted)
I have to import data into Excel from Access (yes, I have to import it to Excel and cannot use Access exclusively). When I import; however, the formatting does not come over correctly, most especially losing the formatting of numbers. I need one of two solutions:
1.) How to get the formatting to move over correctly?
2.) Or how I can save the formatting of a table, then be able to apply it as a "saved" format? The biggest thing is that the numbers will changed the number of decimal places and/or change from general numbers when I want to see them as currency.
The top table shows how i want this formatted, the bottom shows how it is importing.
I have an SQL Server that has a query (a view stored on the server) which takes roughly 10-20 seconds to execute. This execution time is the same in Excel 2007 if I import data to worksheet/pivottable. It is also the same in Excel 2003 while importing data into a worksheet. It returns about 350 rows.
However, if I try to make a pivot table in 2003 based on this query, it is much slower. I can set it up fine, but refreshing this pivot table takes at least 10-20x as long to complete, in the order of 5-20 minutes, to sometimes taking so long that I give up and kill it by hitting escape a bunch.
It's important to note that I am forced to used Microsoft Query to set up a pivot table in Excel 2003. There is no other way, I believe.
While it is running, Excel just sits there saying "Waiting for data to be returned from Microsoft Query".
Here is the weirdest part. Once the refresh starts, Microsoft Query loads in the background, you can see it on the taskbar. I believe that is expected behavior, but if I click on MS Query and view its datatable, I can see all the data is sitting there.
So what is the hold up? MS Query has the data. Excel is waiting for it to be returned. What is going on? And remember from above, if I do a simple import data to worksheet, MS Query is not used and everything is fast.
So my question is does anybody have any tips/advice on this issue? I need a way to not use MS Query for a pivottable's data source or I need a way to make MS Query not freeze up. I don't get why MS Query needs to be involved in the first place since I am not doing any parameters or so forth.
I created a union query in Access to join two tables (Projections and Actual Sales). The query produces the results I want. I need to create a pivot table in Excel using the union query as the source. When I pull up the data import function in Excel, the union query does not appear. Do I need to do something else? I have tried to create a select query where I select all from the union query and I can find that fine.
When I use this query to create the pivot table the results end up all zeros when I try to sum the values. It creates some crazy results when I show it as count of also.
I can provide the data in either the Access database or Excel spreadsheet.
I have created a pivot table in Excel 2010 that lists amounts used of particular items each month. Inside the pivot table value field settings i have changed the show values as field so that it displays the difference in usage from this month to last.
However if i now select a top 10 filter it only filters by the total number used as opposed to the difference in usage from one month to the next (which is the values displayed).
Is there a way that i can filter by top 10 by the actual values displayed in the pivot chart and not just the underlying data that creates it?
I need the VBA script in excel that will do a SQL Query, for this case I need to select a value where there are 2-3 tags and between certain period then display the result as a table in a worksheet.
Example I have a database with 3 types of tags "Tag A", "Tag B", and "Tag C", and each tag have a value with different timestamp. the database looks like this:
No. Timestamp Tags Value 1 1-Jan-2010 Tag A 18 2 1-Jan-2010 Tag C 20 3 2-Jan-2010 Tag A 20 4 3-Jan-2010 Tag B 17 5 3-Jan-2010 Tag C 19 6 4-Jan-2010 Tag B 18 7 4-Jan-2010 Tag A 20 8 5-Jan-2010 Tag A 22 9 5-Jan-2010 Tag B 18 10 5-JAn-2010 Tag C 20
I've used the code below and it's worked to stop Update Links message, but i still need one tip to avoid continue message that shows up after Update Links massage:
Private Sub Workbook_Open() Application.AskToUpdateLinks = False Sheets("Feb").Activate Range("A200:I400").Select Selection.QueryTable.Refresh BackgroundQuery:=True End Sub
I have an Excel spreadsheet with a query to an Access table. The query pulls data from 2 columns in a table and pastes it to the spreadsheet. I am trying to update the VBA a little on one sheet and now I get the attached error whenever the code tries to run in Excel. Here is the code with the offending portion separated at the top.
I do this each week with with approx, 40,000 records, (single dimention) copying and pasting is becoming a chore. Does anyone know a method to address this via functions, macros, formulas, etc. Number of rows and columns vary each time I repeat the exercise.
I have come across a situation where I am listing the top 10 customers based on their sales. I have a worksheet for each product I sell. I'm wondering if there is a way to write an excel formula to pull just the top 10 customers from just a single pivot table (respective to the product worksheet) instead of having to create a new pivot for every product and sort based on top 10 and then link to my spreadsheets?
I would like to create Bill of material from single table. I need to select multiple parameters, to expend it till the lowest level, so I will try to explain:
I have one table (ODBC) and there's all data we need. Parent number col A, Item number col B and quantity col C. First level I select main Item number A1234 (this is only thing that I should choose, everything else should be automatically), I get table with all items that are parent A1234 (let's say 10 items). Now I need to look again one level lower in same table for items that have Parent item in list of those 10 items listed earlier (let's say 30 items) and multiply their quantities with quantity of their Parent Item (total qty could be in column D). Then one level lower for items with parent items in those 30 and so on and so on. So when I choose main Item I would like to get table like below (take notice that real table has over a 100.000 items, but I want to show only Bill of material for the main item till the lowest level).
Parent Item Item QTY Total QTY
A1234 B1111 5
[URL] ...
I'm flexible and ok to use VBA, SQL, Excel functions, multiple tables (how to select multiple parameters??)
I'm trying to condense a table of calculations down to a single array formula, but am getting stuck on one piece of it.
The table data is very simple, and can be in just two columns:
1, value 2, value 3, value 4, value 5, value
Where 1 thru 5 are time periods, and values are various numbers.
I want to perform the GammaDist function on each value. It requires a time period input, and in this case it is the 1 thru 5 in the table. So at the end of period 5, the formula for the first value would be
=Gammadist(5,x,y,TRUE) (x,y values not important here)
and the formula for the second value would be:
=Gammadist(4,x,y,TRUE)
The only thing that changes is the period number.
So, my goal is to write an array formula that will sum the GammaDist for each of the 5 rows, for all timeperiods (which is 5 in this case)
I can get this far:
={SUM(B1:B5*GAMMADIST(ROWS(1:5)-1,C1,C2,TRUE))}
But this passes 1 thru 5 to all rows, I only want 1 thru 5 passed to row 1, 1 to 4 passed to row 2, etc.
We have a list of around 800 clients containing client id, name and e-mail and i need to add contract number. I can only get the contract number by accessing the admin (password-protected) using a URL that looks like this admin/index.php?client=id.
Problems:
1. if i use the From Web option in excel's data tab, i get the entire table not just the needed cell 2. if i get the data using the above mentioned option, i can only do it from one client at a time
QC'ers can enter up to 3 different error types committed on a single failed policy, thus the reason for 3 error fields, even though all 3 fields offer the same value list selections (ie ErrorTypeA, ErrorTypeB, ErrorTypeC......). A policy, whether it has one error or three errors assigned, should only count as a single fail against the associate.
My problem comes into play when attempting to pivot the data. I would ideally like to see the pivot table in this format:
(filter)Associate (filter)QC Date ... ErrorTypeA.......Count ErrorTypeB.......Count ErrorTypeC.......Count ErrorTypeD.......Count
Where the "count" is the total number of occurances of that error type across all three error fields - 1stError, 2ndError, 3rdError.
But since 1st/2nd/3rd error fields are different columns, I am unable to do a single count.
My pivot ends up looking something like this:
1stError.....ErrorTypeA.......Count 1stError.....ErrorTypeB.......Count 1stError.....ErrorTypeC.......Count 1stError.....ErrorTypeD.......Count Then repeated for the 2ndError and 3rdError fields.
This is the text file: Video.txt. I import it using the following settings: "Delimited" as Original data type and "Comma" as Delimiters, with all the other settings left to default. Everything is imported into a single row. It is supposed to be a table, with Stk_No, Title, Certificate, up to In_Stk as column titles; then, all the rest should come below the column titles as rows (they seem to be separated by 5 commas). Am I missing a setting or there is a problem with the text file?
I am trying to generate several pivot tables from one data source table. I have successfully created my first pivot table (A date field, and a water storage facility level reading) and subsequently a graph from this. I have worked out that I need to group my dates as I am supplied a daily reading, but only need monthly average. All worked great.
Now i need to create more pivot tables and graphs. The next one I want is to create one grouped by years. But when I create this new pivot table and change the grouping of the date field to yearly, it also changes the grouping on my first pivot table, which is undoing my work.How to tell excel that these pivots are independent, and I don't want them changing in unison? See screen grab of my source data and where I am up to...
Microsoft Excel - 401027_0100.00_0221.00.csv_2014-03-10_11-41-35.jpg
From a table like the one here, how can I generate a list (without spaces) of all the names only? Perhaps filtering by "Mr","Miss","Dr" or something? The result I'm after would be a column on a new sheet that ran:
Mr James Mrs Milly Dr McAllister Miss Aujard Mr Barker Mrs Stanley