I have some code that imports a csv file into a workbook. This works fine when i use a file named .csv. I was hoping to use a random file name (in this case .bmhs) so that we can determine which files we need to import.
The problem i have is when importing a '.bmhs' file the data comes in column A and is a comma seperated list. If i use .csv then the commas are used as the column seperators (which i need).
I am trying to take multiple tables from a Word document and import them into an Excel worksheet. Currently I have found two versions that when combined, could yield what I am looking for. The first one imports the table's data from Word, but does not maintain formatting of the table (font, colors, rows/columns etc.):
The next code maintains formatting, but only imports/pastes one table:
For the second one, I do not like the fact that it is calling a specific Workbook to paste into. If I could somehow maintain the ability to import/past multiple tables while keeping formatting that would be perfect. An extra bonus would be to import each table within the Word document into individual Worksheets in Excel. I am also using Office 2010.
References: [URL] .........
VBA - How to preserve source formatting while copying data from word table to excel sheet using VB macro? - Stack Overflow
For a weekly import into Excel, I need to delete the last row each time. I'm using Excel 2010. My first thought is to start with the first cell, A1, and use .End(xlDown) to find the last row. Do I have to assign a variable to hold the row value then delete it? Or can it all be done in one statement without a variable?
I'm working on MS Excel 2010 and trying to have a macro duplicating a sheet(and it's associated macro "Update") in another workbook.
I manage to do almost everything except to import the required module "Update" from a precise and static folder ("Ressource" located in the same folder as all the workbooks) into my active workbook, which is surely possible.
Moreover if you know a way to check if a module already exists and in that case overwrite it, I'd be even more grateful. Presently I just skip the error if it exists.
Here is my actual code:
Code: On Error GoTo ErrImport ErrImport: If Err.Number = 1004 Then MsgBox ("Already there")
Is it possible to disable Import Data Dialog box in Excel 2010? I have a web query file. I want to copy its content and paste in a new worksheet under an existing workbook. I have a macro which does that but I get Import Data dialog box when I tried to paste the copied content from test.iqy file to new sheet. The dialog box has
Select how you want to view this data in your workbook? By default Table is selected, which is fine.
Where do you want to put the data? By default New workbook is selected. I want to have Existing worksheet selected by default.
Is there a way to set these requirements into vba code and make this dialog box not appear at all?
I am using Excel 2010 and I want to import data from a text file, but the problem is that the data is more than 1048576 rows of excel. Is there any solution though codes if one sheet fills up and import remaining data to other sheets ?
I have small bit of import code (below), that I am looking to modify. The data that I am importing is for an inventory tool that determine optimal on hand quantities and alerts to any issues. In the past there had been one inventory source (one .csv data file). So I populate that to one sheet and modify the data on that sheet. I now have multiple data sources that I need to address.
There are two things that I would like to add/be able to do.
1) I would like to add a dropdown or set of multiple buttons to the popup window that says "Select the OnHand Report". Previously I only had one report source which I posted to sheet "orow0205". I have 2 other data files now that I have to import and they need to go to sheets "orow0206" and "orow2144". I am grabbing the data the same way on each sheet so that doesnt need to change I just need the option on the pop up window to determine the sheet name I want the import to go to.
2) The files that come from the sources above have a file name like "20121213_00000_groupstatistics.csv". Where the first eight digits represent the date the file was generated. If possible, after I select the sheet via the popup solve above, I would like to have the date populated in "MM/DD/YYYY" format in the last column of the imported data (the same date for each row of data imported). The file imported has no date data on it and can represent any day (which is why I am not using some form of TODAY formula).
I'm trying to create some vba code that will go into other .xlsx documents, pull all cells with a value in the first 30 columns and then return them as a table. Basically each work crew has a .xlsx spreadsheet containing their schedule and I am trying to bring them all together into one nice little package. If I go to import from external sources then click XML data, navigate to the folder they are in and them click show all files and pick my spreadsheet it imports nicely. Then I go to the next blank cell in column "A" and repeat for the 4 crews. Now I can filter by each crew but all 4 are visible on a single page as a table. I recorded a macro that shows everything I did, but it is not dynamic (the .xlsx source files name changes based on the month) I'm running XP sp3 with Excel 2010
I need to import thousand of txt files into 1 worksheet keeping the file names as data. Each txt file has 2 columns :
1 0.65914 2 0.65945 3 0.86062 ... ... and each txt file represents recordings made at specific time and date (e.g 0158.DSG_RAWD_HMS_21_ 0_ 0__DMY_29_ 2_12_pulses). I would like to have 2 columns: 1) with the time taken from the name of the txt file (e.g. 21:00:00) and 2) the associated recording. Something like this:
I currently have a userform, and on commandbutton_click, it performs the following code that adds a column in a access table to a combobox(cbList)
Private Sub CmdName_Click() Dim rstName As ADODB.Recordset Dim strClientDatabase As String, strConnectionString As String strClientDatabase = ActiveWorkbook.Path & "9001.mdb"......
After its listed on the combo box, upon commandbutton_click on another button, i wish to extract a particular record, based on the selection made on the combobox(cbList). This is where im having problems caused i have no idea how to do so. I just want it to extract the particular record row, based on cbList, and insert it into range A100:D100 in a particular worksheet. It is then updated and added to a listbox which ive already done the coding for, and with another button click it would add the details in the listbox into the appropriate location i wish to.. The only place im stuck is with extracting the data from access into a A100:D100 range in any worksheet. what ive come up with, but is incomplete is :
Private Sub CmdImport_Click() Dim adoRS As ADODB.Recordset Dim strSQL As String Dim strClientDatabase As String, strConnectionString As String strClientDatabase = ActiveWorkbook.Path & "9001mdb" .........
I have a workbook which, amongst several worksheets, also includes 12 blank worksheets (one for each month of the year).
Is it possible to have a macro that will (a) first prompt the user to select an excel file to import (the excel files to import are provided each month and only have one tab); then (b) select which worksheet to import the data (values only) from the selected file into.
I am using lesson 33 of Excel VBA and Macros with Mr Excel as my guideline. The coding is as follows:
Dim WBO As Workbook 'original workbook Dim WBN As Workbook 'individual data workbooks Dim WSL As Worksheet 'List of files worksheet Dim WSN As Worksheet
Set WBO = ThisWorkbook Set WSL = WBO.Worksheets("List") Set WSD = WBO.Worksheets("Data")
I have indicated above with ( ) the beginning of my problem.
From the workbook with the list of workbooks to open, in each case I want to refer to a worksheet in each workbook named "Report" and grab all the rows with data exept heading (rows 1 & 2) and 9 columns.
How do I get WSN in the code above to include the worksheet named "Report" or do I need different coding. Using Windows 7 & Excel 2010.
I use Excel 2010, 64-bit-version with Windows 7. I have one workbook, where whenever I create a formula that references to one specific sheet, the Excel crashes and cannot be quitted even with Task Manager. I have to restart the whole system.
I do not have any worksheet events in either sheet. This is the same workbook that crashes if all cells are selected from the top-left corner of the worksheet.
I tried by deleting unnecessary COM add-ins but that didn't work.
I need to create 3 or 4 detailed reports from an excel 2010 worksheet.
My worksheet contains data including date, invoice number, company , consultant, days, dollars. There are approximately 100 records in the worksheet.
Requirement 1 :I want to use excel 2010 to automatically generate a series of reports broken down by consultant showing date, invoice number, company, and consultant with totals for days and dollars, when all the records for consultant 1 are listed, then I want to show consultant 2.
Same for any other consultants with a grand total at the end.
My understanding is that excel 2010 makes this process very simple .
I have a workbook with worksheet like 2a, 2b, 2c, 2d, 2e, 3a, 3b...etc Is it anyway i can make a tab which will hide a group of worksheet (like 2a,2b....2e) together and unhide all the worksheet with another click on it? becasue i got too many worksheet to show in the bottom..
I am using Excel 2010 64-bit (with SP2 and all other updates installed).
I have a worksheet where some cells have a yellow background, based on conditional formatting of what is in column A. (Note that data in column A changes, so the row can sometimes be yellow and sometimes be white.)
I need to sort this worksheet as follows:
1. By background color, so yellow is on top, white is on bottom. 2. Then, within the yellow rows, data in column J. 3. Then, within the white rows, data in column A.
Currently, I do this manually by sorting the entire worksheet by column A, then selecting only those rows that are yellow and sorting by column J.
Is there a way to combine these steps, perhaps with a macro?
I initially thought to make each "background color" its own table, but since column A can change and thus the background color of a row can change, I need to be able to have rows move from yellow section to white section. I don't think having two separate tables allows that.
I have an excel file with three worksheets in it. I can happily protect each sheet with a different password but what i want to be able to do is the following:
a. have a global administrator password for all the sheets - so i assume set the same password to protect the whole sheet b. have individual passwords that only allow the user to insert rows and change data within restricted columns, i.e. can only edit columns A:Z and cannot manipulate any formulas within that range A:Z
where to find a spreadsheet which has a macro to perform the FFT on data with > 4096 points? It seems Excel's internal FFT is limited to this amount. I searched the forum and elsewhere on web and have not found what I am looking for. I wish to enter the data in a column of the spreadsheet, preferably in a named range such as "Data" and have a macro perform the FFT.
I have a macro-based employee leave system that works by couting the number of days shaded with a certain colour and thus calculating leave days taken, remaining and entitled... I have a single workbook with multiple sheets for different employees.
However, when I update by using ctrl alt f9, it updates all the other worksheets (ignoring their shading) with the values of the active worksheet! So if I update Peter, who has taken 14 days so far, it will update Liam's sheet too, with 14 days, ignoring Liam's actual shaded days...
How can I update each sheet individually, without compromising the other sheets?
how to use the offset function to create a dynamic range in Excel 2010. An in-house Excel form I work with spans columns A thru P and has three sections. In Section 2 the user fills in employees who are requesting to work overtime. Section 2 starts row 12 and ends row 61. It's sometimes necessary to add rows to this section. How do I make this section/range dynamic using the offset function?
I have a workbook that is doing something I don't understand. In several places I am using arrays to transfer/modify information, then placing the array back onto the worksheet, and this works perfectly. The following code... doesn't.
(I've cut out unnecessary code like variable declarations - all my integer items are declared as Long)
Code: Dim varA As Variant, varB(10000, 1) As Variant Set wkDest = Sheets("a") erB = 0 For lpTerm = 1 To 4
and several other ways. What happens is just null output, a full column of nothing. However, when I expand my worksheet range to two columns, all the data from varB appears - it is shifted down one column and row. So my data starts at .cells(2,2) instead of .cells(1,1). The data is all perfect, I've verified it left and right.... I just can't figure out why it's getting shifted like this.