I'm trying to create a geography project for my upcoming primary class but my Excel expertise is limited.
I am trying to import small jpg's from a folder and then make them appear in a userform or Msgbox. Is it possible?
So far I've created a very simple way to display the text in a message box but I would also like to be able to display the flag. Macros 2 & 3 are initiated by clicking on images while macro1 displays the information:
I have a form in excel that has a box which prompts you to add a picture when you click on it. It then resizes the picture so it fills the box. The file with no pictures is 2.3 MB. The picture is 700 KB. The file with the picture is 24.5 MB and 49 MB with 2 pictures. I need to E-Mail the form to other people but I can't send anything larger than 22 MB. I tried using th compress pictures option on the toolbar but it only took it down to 23.9 MB for a file with one picture. Why is it doing this and how can I make the file smaller?
I am using the following code to browse to a CSV file and import it into my current workbook. How can I “capture” the name of the text file (myFile) for future use?
myFile = Application.GetOpenFilename("All Files,*.csv") If myFile = False Then Exit Sub End If
' Open file With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & myFile, Destination:=Range("A1")) .Name = "DATA" .FieldNames = True...............
I have an workbook with pictures that are linked to external picture files, and they are placed in the workbook via macro. When I email the file to another computer and open it, the pics do not display and show an error:
The linked image cannot be displayed. The file may have been moved, renamed, or deleted, Verify that the link points to the correct file and location.
I would like to be able to save the workbook with the pictures in them (without having to archive them) so that I can open it and see them on another machine.
I am creating a proposal for a online sales store, i have in column A a list of item names that my buyer liked and wants to run, but i have to send them the pictures for the items which is located in a directory on my drive together with all other items. we have 4 category's of pictures 1 is the main image from this we only have 1 of each item, then we have the S category there we may have up to 3 images s1, s2 and s3 not more then 3 and the same is with the R category and with the M as well. We did created a VBA to copy all images from the list into a new directory with all sub pictures into a new sub dir. and bring back a list of all images not found. But i am having a problem when i run the code if it dosnt find the image looking for (for instanse EAR11-M1 the code stopes there looking for the file even the error checking in the code is set to resume what is wrong with code?
I am importing data from a csv file into another program. For some reason this particular cell is causing everything past it in the same row to be thrown off. It is moving bits and pieces to the next column, then the next, etc....all in the same row though.
Can you see anything in this data that would cause issues in a csv file when importing. The data in this cell is html code for an ecommerce item description.
How can I limit the number of lines when importing a file? Limit the import to the first 53 lines of a file that has 50,000+ lines.
Want to import the first "XX" set of lines, then I want to skip a set of lines, then continue to import the rest of the lines. The second import needs to be inserted 2 or 3 lines down from the first import.
There is the function:
Workbooks.OpenText Filename:=
But it only has a StartRow and can not specify the "EndRow". Also can not specify where to start in the worksheet, i.e. Cell A5
I have made a macro to import the a excel file into a new file after truncating few initial rows. Here is the code for it:
Sub Import() Dim Prompt1, Prompt2, Prompt3, myDir, myFile, mySheet As String Dim ClCnt As Long 'column counter Prompt1 = "Enter the location of input file:" myDir = InputBox(Prompt1) Prompt2 = "Enter filename:" myFile = InputBox(Prompt2) Prompt3 = "Enter sheetname:" mySheet = InputBox(Prompt3) With Workbooks.Open(myDir & myFile).Sheets(mySheet) ClCnt = .Range("A33:CB33").SpecialCells(xlConstants).Count ' Count the number of columns present..................
I have a multilevel XML file. Attached my1.zip (XML files cannot be uploaded as is, hence I had to zip it). When I import the XML into excel, it creates multiple columns for the multilevel data. However, I need the multilevel data as additional rows. I have attached another excel file sample.xlsx which shows how excel imports the XML and how I actually need the data to be.
Screen shot attached for your quick reference sample.xlsx.jpg
What's the technique for opening a .pdf file and copying its contents into Excel for subsequent analysis by VBA?
On my Mac version of Excel there doesn't seem a facility to import it or even copy and paste it. Is this something that's available in Windows versions of XL?
I want to do is import a TXT file that has about 70000 rows of numbers into excel. I know it has a max of 65536 so I would like it to import the numbers and put them into 2 columns C and the rest in D.
Sub ImportLargeFile() 'Imports text file into Excel workbook using ADO. 'If the number of records exceeds 65536 then it splits it over more than one sheet.
Dim strFilePath As String, strFilename As String, strFullPath As String Dim lngCounter As Long Dim oConn As Object, oRS As Object, oFSObj As Object
'Get a text file name strFullPath = Application.GetOpenFilename("Text Files (*.txt),*.txt", , "Please selec text file...") ........................
I am trying to create a macro that imports a text file that has a changing name (it has date/time info in it). The file name will have some consistent parts and the rest I hope to be able to use wildcards on. In the code below, the path will be constant and the file name will always have "Heavy Water" in it. How can I change the code to import any version of the file?
importing a text file. 3 times per day, I pull a report off a website and save it as a txt file. Typically, the data consists of approx 2000 customer ID's, and their respective data. When I import the data into Excel, it uses 2 or 3 rows to list information for each customer ID. I need a to seperate out only the customers ID which are 9 numbers long (no text in the ID), their SS #'s, and are listed as "FUL Request" or "PTR Request".
Since the data takes up 2 or 3 rows, the "Text to Column" feature does not work.
So the VBA should be able to look at each row, and if it has a 9 number customer ID in the row directly above it, and meets all other criteria, them post the customer ID number, the SS# and the verbiage "FUL Request" or "PTR Request" onto a seperate sheet.
Or the VBA can simply delete the rows that don't meet the criteria listed above.
I am using Chip Pearson's method of importing a text file into Excel (found at http://www.cpearson.com/excel/imptext.htm )
It works great except for one aspect. Two of my columns of data are in the format "dd/mm/yyyy hh:mm:ss", which is very necessary.
I have set the worksheet, the file is being imported into, to the same format. My problem is that, during the import of data, Excel (in it's wisdom) decides to automatically transpose the dd and mm numbers (if they meet the natural calendar conditions i.e. 01/09/2006 becomes 09/01/2006, 09/01/2006 becomes 01/09/2006 whilst 21/09/2006 remains the same).
As you can imagine this causes havok with several other functions that I have running off that source data (once imported). I have looked at the code and, whilst I can follow the general gist of it, I am unable to find any reference to format of the data.
I have a program in unix that ouputs a text file in .csv form which allows me to import my data into an excel spreadsheet very easily. I am wondering if there is anyway I can add formatting, like to tell excel to make a cell green or something like that.
If it can't be done with .csv, is there any other tool or format available that will accomplish this?
I have VBA code that imports a text file using a fixed width separator within the code. The code is working just as I need it to work and placing the information/data in the columns that I have specified in the code.
The issue I have is I only want to import certain data that is contained within the text file. It is going to be a little hard to explain, so I have attached a sample of the text file with dummy data to better explain. The file is broken up into different segments. Each segment is identified by a “Base Number” in column A of the text file (once it has been converted into an Excel file).
For my example, I only want to import data for Base Number 38451. The information for this segment is easy enough to identify when the data starts and when the data ends. As in this example, the first occurrence of 38451 begins at row 257. Once the first instance of this number is identified, the first row of data that I require is always two rows after.
I think the coding should go something like this, but I just can’t figure out how to put it into my If cell in column A = 38451 then - start importing from 2 rows down - continue to import until next row in column C is not = date
If row in column C = blank then - search in column A until cell = 38451
If cell in column A = 38451 then - start importing from 1 row down - continue to import until next row in column C is not = date
Else - stop import
I have included two files. (1) the text file with the data (2) the Excel file. There are two tabs in the Excel file “ReconSheet” (contains the data that is imported from the text file) and “Desired Result” (this is how I want the end product to look).
I have bit of code that opens an external excel file (call it the source workbook), grabs certain data, copies the data to other excel file (call it the destination workbook), and then closes. I have most of the code completed but am running into an issue with how to grab certain data from the source workbook and copying it to destination workbook.
I want the code to read the data in the source workbook line-by-line.
For each line that is read, I want to copy part of that data (value in column A and column B) to column A and column B of destination workbook only if the value in column D is equal to “Block”. For column C and column D, I want to do some form of lookup, being I want the code to look at each line of data until it finds corresponding line in which column A = “60612105” and in which column B = the value in B. Once this line is found, copy the value in C to column C of destination workbook and value in D to column D of destination workbook.
I have attached two files. First file is the import file (destination workbook) which has two tabs; (1) import tab (2) desired result. Second file is the raw data file (source workbook). Hopefully this makes since.
Basically, I have a column that contains a list of names of files without the extension, ie "A2=File1" What I want, is for excel to open the file associated with the name in the column, "(A2).xml", and extract a value from that.xml file and insert it into B2.
I have searched and all of the examples I find aren't quite what I am looking for. I have an add-in that works exactly the way I want it, but does not extract certain values that I need it to. This is a commercial add-in so I don't have the source code for it or else this would be a snap.
I have a group of CSV files that I will need to periodically import and sort in Excel.
The CSV files will contain one column I wish to use (It is the first one and the rest can be ignored or imported) and sort the desired data based upon the existance of a particular bit of text. Each entry will either be just a username or a username with a '-label' appended to it so for instance each of the CSV files might contain:
bob fred mark-label ted angie-label
Basically I want to seperate the names with the -label from the ones that do not have the -label. Doing searches, I was able to get part way using the code from this thread:
[url]
But am running into problems trying to modify it to suit my needs. Is there an easy way to accomplish this? I'm not very good with VB so that hasn't helped me. It would be nice to move the sourted output to seperate columns if that is possible.
am in a time crunch to write VBA code(not use the macro recorder) to do the following:
Input data from a tab delimited Text file into a pre-formatted sheet.
Each column of the text file is as follows (product code, buy/sell, quantity, price, date) Example row below.
YM Buy 50 12800 1/2/2008
Is there code I can use to do this? I need each individual piece of data to import into it's own cell while keeping the Row/column alignment of the original text document.
I am trying to have the total (cell e78) from one of my own excel files automatically filled into a cell in a different excel file when the number of that file is typed into a third cell. i.e. if the total on Ticket 4126 in cell e78 is $4500, then when I type 4126 into the Ticket # cell on my seperate Invoice I'd like it to fill in the third cell under Amount as $4500. Is this possible?
is it possible to import just a portion of a csv file into my excel workbook? For example:
My csv file has data from 2010-2015. I want to somehow import only data between 2013-2015 from the csv file into my excel workbook every time I click refresh.
I cannot delete data from the source file because many other people are using the same file. Is there some sort of "SQL" for excel that makes it possible to trim csv file?
I run reports that tell me when an individual is supposed to be in the office and when they actually log in, but this is a manual process where I have to go through several hundred people each morning and check. I have created a macro that pulls in their time in and out and makes there name appear as Last, First.
I run a seperate report that creates a schedule with headers and other information that is useless in this process. I have attached a dummy file and get this down to the last, first name and then the times in and such with no headers? I am also trying to keep the total number of people at the bottom in it's own cell.
I am at a loss as the file uses multiple spaces and not ,'s or ;'s etc.
FILE:
From: 12/14/11 Data TotalView 12/14/11 To: 12/14/11 Company ABC 13:45 Daily Start/Stop Unit Name RED
I'm working on creating a custom HTML report with javascript that I will be using to import in to excel to populate some graphs. Basically everything is working, except if I use javascript to show me a value.
When I use Import Data from Web via excel, everything gets imported except for the javascript part of the html doc.
An example of the html file (stripped down to nothing but 3 peices of data): [URL]
Need Macro where I can import a text file saved on my computer into a new sheet named yesterdays or todays date in format "ddmmyy" and then the sheet gets hidden.
I am having problems choosing a format for the column in my spreadsheet that contains my account codes. This is especially a problem when the code starts with an '=' sign and is followed by a number or has a '£' sign followed by a number.
I receive the file in a .txt format which I guess if I get it that way I would not have a problem but as I need to work on the file in excel before uploading it I experience problems. For instance when I open the file the codes that begin with '=' + a letter for instance =Y just comes up as '# name?' and only when I click in the cell can I see that it is =Y. Also the code '=1' just comes up as '1' as does '£1' - now this causes problems as for a start I need to do Vlookups on the account code but now instead of three distinct codes I have 3 1's.
The only way that I have discovered how to solve this is to click into each cell and add a ' before the text. (this changes the format to text - right??) But obviously this is very time consuming - is their a quicker way to change these cells. I can't just right click and format cells - text. This does not work?
This question is mostly academic, but I do hope someone out there has an answer. I am using code to open a text file. Since the first column is always blank, I would like to start the import at column 2. I think this can be accomplished with the following
If you specify that a column is to be skipped, you must explicitly state the type for all remaining columns or the data will not parse correctly.
I haven't seen any problems, but I hate to use code that isn't supposed to work, even if it does. Does anyone know what problems could be caused by not explicitly stating the type for the remaining columns? Question 2: (I know, one per thread, but they are very much related. I will move to new thread if need be). If I don't know the number of columns, how can I explicitly state their type? For example, if I knew I had 4 columns, I would use:
I have thousands of Excel files, each with a generic names (i.e. 2009092812163503.xls)
Each of them contain a header with contains column titles like Company Name, Executive Contact, Address, etc and then a single row of data for a single company.
I want to be able to task excel to extract all the data in the second line and enter them all into a single spreadsheet for further work.
We're talking 30,000+ unique files here, what would be the best way to approach this?