Import Specific Cells From A User Chosen Spreadsheet
Nov 24, 2009
I need to import some spreadsheets that are sent to me into a master database spreadsheet. I have attached both below. The complaintstest.xls is the master database and the other is the sheet that will be imported. What I would like to happen is when the macro is run, the user will be able to select the sheet they would like to import through a dialog box. After the sheet is selected the macro will import the cells from the selected sheet into the master database in a particular order. In the master database example on row 2 I have listed the columns from the sheet to be imported in the corresponding column on the database sheet. This will macro will be run a couple of times a week so the macro will have to find the next empty row to start the import on.
View 14 Replies
ADVERTISEMENT
Sep 23, 2009
I am trying to do an automated import, the file I'm importing comes out of an application and in its properties just shows "file" so I can't use the standard text file methods. I originally recorded a macro for the automation and have tried to amend it.
I think it is falling over in the Destination stage, or maybe I need something instead of where the ". Name =" would normally go?
Private Sub All Files()
Dim sFilename
sFilename = Application _
. GetOpenFilename("All Files (*.*), *.*")
If sFilename <> False Then
Sheets("Sheet2").Select
With ActiveSheet.QueryTables.Add(Connection:=sFilename _
, Destination:=Sheets("Sheet2").Range("A4"))
'.Name = "All Files"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
View 5 Replies
View Related
Aug 10, 2013
I can't figure out how to delete the attached files that are irrelevant and I can't figure out how to upload new ones. I also don't know how to word what I need to happen
I want the data from everything, starting from row 5 and going to row 100, and not include column B or E.
How do I grab just that data? I have different formulas in each document. This is for invoicing, so the columns with the $ numbers can't be changed and I haven't been able to figure out how to not overwrite them when importing another spreadsheet.
View 4 Replies
View Related
Feb 13, 2014
In spreadsheet attached, column F is populated with file names. I need VB script to import content of each respective file into corresponding cell in column E.
I've got over 25k of records and the same amount of txt files that I need to insert into cells. I have found this script :
VB:
Sub MikeMaster()
Dim x As Integer
Dim temp
Dim i As Integer
Dim Drive As String
[Code] .....
But need to modify it to do something like this: read cell from column F (Text File) > find file with corresponding name in given folder > Insert content of that text file into corresponding cell in column E (Description) > go to next row and do the same.
View 9 Replies
View Related
Nov 30, 2007
I need to create a file on another computer system that I can import into specific cells on specific sheets (to fill out a "form" required by a vendor). What instructions/macros can I add to the download file to specify the sheet/cell that a value should be loaded into?
View 2 Replies
View Related
May 8, 2014
i have a question regarding the import of csv-files. I've seen lots of working import-functions/macros but none of them. So here are my questions:
1) is it possible to import data from a csv-file into specific cells in my worksheet? Let's assume i have a csv-file with 10 INT-Values and they all should be placed in different rows/colums with no regular pattern.
2) If the answer of "1)" equals "yes": how is it possible?
(i thought about importing the csv in an so called "helper-worksheet" and use formula/references inside the table, but to be honest: That's not the solution i like to have)
View 5 Replies
View Related
Apr 21, 2006
I am trying to run a macro once a particular word shows up in the combo box. now in my chase i could try to use VBA code to run the macros such that once the arrow is used in the combobox to select a certain word a particular macro labled the same name as the word chosen would run.
View 5 Replies
View Related
Jul 31, 2008
How can I import data from a text file into my activeworksheet? Also, I need the user to be able to choose which text file to import.
View 9 Replies
View Related
Mar 15, 2009
Is there a way to protect some cells of a spreadsheet from user input (by typing only), yet letting button controls and VBA macros modify the values of those cells?
I need to prevent users from accidentally deleting formulas or values generated by VBA macros or controls, although they may delete values in some cells.
View 9 Replies
View Related
Sep 11, 2007
Right now I am constructing a macro so that upon exection, the user will be forced to select one of the dropdown menu options which are listed in a dynamic array. The dropdown menu should be in a popup of somekind created by the macro and not on any of the worksheets or charts. I would like to then assign the choice that the user makes to a variant. I have searched the web but not found what I am looking for and was hoping that someone could give me some phydocode that I can look at.
The restrictions that I am operating by do not allow me to place a combobox upon any of the worksheets which is what I find in all the examples posted online.
View 4 Replies
View Related
Nov 24, 2008
My worksheet with macros gets messed up when a user selects either multiple cells from column F or selects multiple cells in any one row (but only if column F is included) in the range C17:O116 and hits "delete". I will either do an exit sub, an application.redo, or something similar so that this doesn't happen, but I don't know how to write the code to trigger these events. So I need a way to determine "if the user selects multiple cells in column F and hits delete" or "if a user selects multiple cells in any row from 17 to 116 that includes the cell in row F, and hits "delete.""
Set Rng = Range("F17:F116")
Set rng2 = Range("K17:K116")
Set Rng3 = Range("L17:L116")
View 3 Replies
View Related
Jul 19, 2014
All, can I protect my worksheet while at the same time allow users to unhide a specific range of cells?
I'm hiding cell range FA:FK, but based on certain conditions I want to allow the user to unhide the cells but I do not want the user to be able to unhide any other hidden ranges. if there is a way to do this without using VBA. If it cannot be done with VBA
View 1 Replies
View Related
Feb 12, 2009
I have sheets named exactly the same as the entries of a listbox. Now I want excel to copy the value located in e35 in the worksheet previously chosen.
I tried th efollowing, but this doesn't seem to work. I simply recorded a macro doing what I wanted it to do (orange) but replaced the reference to the sheet with what I thought would be the choice the user made (green)
Do While continue = vbYes
UserFormware.Show
Cells(16, 4) = UserFormware.ListBox1.Text
Cells(18, 4) = UserFormware.TextBox1.Value
Sheets("UserFormware.TextBox1.Value").Select
Range("E35").Select
Selection.Copy
Sheets("Calculator").Select
Range("E35").Select
Selection.Paste
If UserFormware.ListBox1.ListIndex = -1 Then
MsgBox "You must select an item"
End If
Unload UserFormware
continue = MsgBox("Do you want to add another warehouse?", 4)
Loop
View 9 Replies
View Related
Feb 22, 2009
Basicly I used conditional formatting and lots of "IF".My solution lacks in style and it's time consuming ..
Long story short: I need to modify the way some cells are displayed based on the selection in a specific dropdown list.
I need that whenI select Task3 from the dropdown list next to "step1: please select" , everything from row 15 to row21 (both 15 & 21 rows included) and from row 23 on, to disappear.
View 9 Replies
View Related
Apr 3, 2014
I'm trying to write an IF formula that will return a number if the word in the adjacent cell begins with a specific letter. Here's what I want to show:
City
01
Express
02
Overnight
03
So "C" would return 01, "E" would return 02 and "O" would return 03.
View 3 Replies
View Related
Jan 25, 2008
I'm trying to find a way to import data from an external CSV file. I've used the import data function off the menu, so know how that works. However, I want to change how that works slightly by forcing the user to select a specific cell start the import at, as well as force certain of the options. Once the import is complete, I then need to fire off a custom macro. The only other option I can think of is to write a completely custom import screen, but I'd like to avoid that if possible.
View 3 Replies
View Related
Jan 16, 2010
I have 2 separate Excel 2007 workbooks and I’m trying to import a complete spreadsheet named Client Info with all its properties from one workbook to another.
View 2 Replies
View Related
Dec 5, 2008
1) Import from a source spreadsheet
2) Copy and re-arrange fields to a new sheet to be imported by a GIS program (MapInfo).
My issue is with the date fields in the source spreadsheet. I copy these into new columns and explicityl via VBA set the NumberFormat of these cells to be date fields ( ie. .NumberFormat = "DDMMYYYY"). On checking the cells the formatting appears to have been applied to my new spreadsheet. However when I open this spreadsheet (new one I create) MapInfo won't recognises these date fields as dates. It seems them as character strings. If I start with a blank sheet and type dates in and autofill and then open in MapInfo it has no problem recognising these fields as Date and imports correctly.
It seems that the source I am copying from has some hidden formatting or something that is overwriting my typed formatting. Any one had a similar experience or have any ideas about this.
View 7 Replies
View Related
Apr 20, 2014
I want to write code so that at the push of a button you can browse and find an ascii file. Select it. and then it will go into the sheet of a excel file that you chose in the code.
View 2 Replies
View Related
Dec 22, 2011
I have about 10k poorly formatted txt files that I need to grab 4 items from each and put in a spreadsheet. How can this be done in Excel or should it be done in Access instead?
Here's a link to what each txt file looks like: MTRP88PF700721.txt
I only need the number next to Posting Journal on line 3 (12686 in this case), the 3 digit number next to Class Total on line 11 (101 in this case), the Extended Cost Final Total and the Extended Retail Final Total (23.77 and 39.30 in this case)
because one of my staff members is currently opening each txt file and typing these figures into a spreadsheet!
View 7 Replies
View Related
Jan 30, 2014
I have a macro that works perfectly to import a text file and parse it. Now i need it to do multiple ones. I import the txt file to a new workbook as i filter for certain data only and if found i copy that to the current workbook. I want to do the same just for many txt files:
[Code] .......
View 4 Replies
View Related
Jul 9, 2013
I haven't work with Excel for a while. I have a "main" file, with info such as name, address, phone #, etc. and another file with additional info for each person required to, in the end, do a merge. How do i combine the 2 files so that the secondary info plugs in next to the last column in the same order as the "main" file.
View 1 Replies
View Related
Jul 12, 2013
Every week I receive a sheet of data that I need to import into my master spreadsheet. The problem is I have to adjust the data I receive to import it unless there's a better way of doing it. I'm trying to automate both the modification and the importing of this sheet. I've tried to create a macro to modify and import without any success.
To adjust the spreadsheet I receive I need to: delete or find a way to exclude the first 3 rows, the bottom row with data stating "complete" and columns C,D&E from being imported; change font, size, color, bold to match the main spreadsheet in addition to formatting; split data in column A and remove any special characters. Formatting is important because I have to be able to easily remove duplicates. Also, the number of rows in the sheet I receive changes weekly.
I've attached a workbook with sample data. The first sheet is representative of what my master looks like, the second is what I sent and the third what I've been modifying it to and then importing. As stated before, I'd like to have my master automatically update with the sheet I sent, but I'm at a loss having to reformat everything every week before importing. Having the sheet that's sent to me revised before I receive isn't an option. What's the best way to automate this?
SAMPLE1.xlsx
View 1 Replies
View Related
Sep 2, 2009
Split From Run VBA Macro From Another Procedure. will it autosave and open all the archives in the file i specify and loop?
View 3 Replies
View Related
Feb 2, 2010
Hi everyone,
I've got several Excel files that need to be edited separately.
Once they have been edited, I need to paste the content of each file in a single separate Excel file.
Is there a way to retrieve the content from all the files in a folder, and merge it in a single file?
For example:
3 separate files > File1, File2, File3
Merged file, sheet1
File1
File2
File3
View 14 Replies
View Related
Nov 28, 2012
i'd like to be able to import a list of file names from a folder. sounds fairly straight forward to me, but example:
folder a has 10 files in it (let's say PDFs - numbered 1 through 10). I'd like to be able to open the spread sheet, and see the file names in column b. ideally, i'd also like subfolders to be listed, in the next column. but, let's start with just this.
View 2 Replies
View Related
May 6, 2007
I have designed a spreadsheet in the office where I work, and think it would be quite flashy (gimiky) if I could have the spreadsheet show the name of the user logged on.
At the minute if I try and access a sheet currently open by another user it will come up with the standard message 'workbook1.xls is currently in use by xxxxx' then you open a read only copy until they have finished.
I was thinking there must be some way of importing this information to excel to display something like 'welcome (xxxxxxxx)(user currently logged on)'
The other part of my problem is that the excel sheet will only display the network uername of the user, but I have seen spreadsheets that cross reference this to the Microsoft Outlook global address list on the MS Exchange server, and display the users actual name.
In a nutshell, I just want to know is there anyway the excel spreadsheet can display the username currently logged into the shared spreadsheet.
View 13 Replies
View Related
Feb 18, 2014
I'm trying to import a range of cells from one workbook to another. I've got this far with it but am getting a Runtime Error '1004'.
Sub ImportData()
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
[Code].....
View 3 Replies
View Related
Apr 1, 2009
I have working code to copy the matching records of an Access table into an Excel worksheet, but now I am trying to modify this code so that I can select a couple of specific fields from the table instead of just copying all of the fields (there are 15 fields in the table, but I only actually need 4 of them for this particular report).
Here is the code I am currently using to copy all of the fields over with the matching records:
Const myDB = "DSD Errors DB tester.mdb"
Private Sub CommandButton4_Click()
' Test Field Select button
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim sSQL As String
sSQL = "SELECT * FROM DSD_Invoice_Requests WHERE `Paid?` IS NULL"
How can I modify this so that I put specific fields from the table into columns in Excel that will not line up with the layout of the table? For the sake of the example, let's say that I need fields 2, 4, 6, and 8 of the table to go into columns 1, 2, 3, and 4 in Excel.
View 9 Replies
View Related
Mar 14, 2009
I am trying to use lookup to return the value when the condition of two cells are met.....
View 10 Replies
View Related