Creating A CSV Document From A Sheet
May 15, 2008
I've got an Excel document that is generated from a third party programme (See ExcelDoc attached)
I'm trying to manipulate it so that a macro creates a CSV file like the one attached (see THK.csv)
I need to have the following columns in the CSV file populated using the Excel spreadsheet
Column A: Will need to have the NUMBER that is in cell B2 of the Excel file in this case the number is 0714 (need to keep the preceeding 0 too)
Column B: Will need the phone number
Column C: Will need the fax number
Column D: Will need to have the email address
Column E: Will need to have the date only
Column F: Will need to have the Order Number
Column G: Will need to have the Customer name
Column H: Will need to have the Customer telephone number
Column I: Will need to have the Customer alternative telephone number
**Column J: Will need to have the 1st line of the address (after First Address in xls doc)
Column K: Will need to have the 2nd line of the address
Column L: Will need to have the 3rd line of the address
Column M: Will need to have the 4th line of the address
Column N: Will need to be a blank cell
Column O: Will need to be a blank cell
Column P: Will need to be a blank cell
Column Q: Will need to be a blank cell
Column R: Will need to be a blank cell
Column S: Will need to be populated with the information that is after the field MyAddress: in Cell B11 of the xls document.
I've managed to get a macro that will take the information and transpose it into a new document and rename it as an CSV file but I am having a lot of problems trying to get the macro to create the CSV file in the format that I need.
**This cell is generated and will have commas at the end of each line of the address and will be terminated by a period (at line 4 of the address. Sometimes there will be 4 lines to an address but sometimes there may only be 2 or three. In the case where there is no information I need to have a blank (null) value in the cell
View 9 Replies
ADVERTISEMENT
May 18, 2006
I am working on a project where I am creating analysis using a subroutine in excel/vba and I would like to have the subroutine generate a report that is a word document. I have never used excel/vba to create and modify a word document and don't know how to approach it. I imagine that I will have a template.doc that I can access and save as another file. Does anyone have an example of creating and modify a word document in this manner.
View 2 Replies
View Related
Jul 31, 2014
I have an excel database where I register cases. I have in it a button that creates a folder with and ID nr that is in column A (I create new ID nr in the next row, when I press the button it will create a folder with that ID nr and inserts a blank word document in it). We have a template that we copy to the folder (depending what type of case). The idea would be that once the template is filled in and ready to print, It would take the values from the ID nr and a reference number a few cells to the right. Is it possible to tell excel to open the word document in the folder and create a PDF version with the ID nr and reference number. (there are only 2 templates, so the macro would have to look for one of the two in the folder) The names of the templates are: "Standard" and "Other". I guess the best way to start maybe this would be that I select the cell with the ID nr and then press a macro button to have this done. One thing that needs to be done, is to put a copy in the same folder and another in a second folder called "Binder" in my documents folder.
View 1 Replies
View Related
Oct 22, 2007
I have some experience with excel, but until now have not ventured into VBA and macros.
I have a workbook which will have the following sheets:
1.Absence Summary sheet - Summarises data from each employee's individual sheet.
2. Template Sheet - A sheet formatted as an absence record sheet, but without data.
3. Individual employee Absence record sheets - Based on the Template sheet.
I have read with interest the various posts and help files on User Forms & Macros, but have got a bit stuck.
My Aim: ....
View 11 Replies
View Related
Jul 19, 2012
I have a multiple sheet document, on the first sheet I have my daily data:
Name
ID#
Ward
TTO
Transport
Transport 2
Date
Time In
Time Out
Time Stayed
ex1
xxxxx
12
xx
Taxi
01/01/12
xx:xx
xx:xx
xx:xx
[Code] ........
This is updated daily and it shows patients that have been through the department, who, when and how long. This is then converted on sheet 2 and shows as:
Date
Number of Patients
01/01/12
2
02/01/12
1
03/01/12
1
My third sheet has a very similar layout to sheet 2 but is weekly, previously i have used the following to find a weekly total:
=SUM('sheet2'!B563:B567)
I now have well over 4000 rows and altering this sum to accommodate for each week is time consuming as sheet 2+ are updated to cover the following 6 months.
Is there a better formula or a way to use the current formula and drag it down to auto fill? Currently trying to auto fill does the following:
=SUM('DAILY ANALYSIS'!B563:B567)
=SUM('DAILY ANALYSIS'!B564:B568)
=SUM('DAILY ANALYSIS'!B565:B569)
I want something like:
=SUM('DAILY ANALYSIS'!B563:B567)
=SUM('DAILY ANALYSIS'!B570:B574)
=SUM('DAILY ANALYSIS'!B577:B581)
View 2 Replies
View Related
Feb 2, 2014
I am processing a fair few Invoices, which are being sent to me via e-mail as excel documents, very often they contain mistakes, a decent amount of mistakes. Usually the prices are wrong.
I keep track of every single entry on the invoice on my own document - Tracker, which I consider to be the superior/more correct document to the Invoice presented to me by my contractor.
Both of the documents have a reference number, which is a specific docket number, and horizontally, in the invoice, there is going to be a price for this docket. In my document, there is going to be a separate column for the total price.
Is it possible (I guess with VBA) to check for mistakes in the Invoice, but use the Tracker as a reference for this check.
Tracker has
columns
A - Name
B - Department
C - Date
D - Docket No.
C - Total price for the docket (calculation of E to Z)
E to Z - all smaller entries
Invoice has
columns
A - Date
B - Docket No.
C to E price for that docket, but it is spread, because departments are separated out, so each VAT account can be charged accordingly. I guess it is possible to do a separate column for the price, if it is easier to do a script that way.
Basically, I need to check if in the Invoice document, the price (C to E) for Docket No. (B) is the same as the price (C) for the Docket No. (D) in the Tracker.
I would like the wrong entries to be highlighted on the Invoice Document, so I can see straight away, that this needs attention.
Not always the price is wrong, sometimes the Docket No. is spelled incorrectly (Dyslexic contractor), hence the highlighting.
View 3 Replies
View Related
Feb 17, 2009
I need a script that will turn a excel doc into a txt doc. Thats the easy part. The hard part (at least I think it is), is I need it to be in a certain format and I'll do my best to explain that fomat below.
View 9 Replies
View Related
Apr 16, 2012
How to write a code to import all tables from a single word document into a single excel sheet? (we don't know exactly how many tables there will be,or how many rows in a table there will be , but the columns are certain, which is 9, from A to I.
View 4 Replies
View Related
May 18, 2007
Anyway to use VBA to print an Excel sheet with the Microsoft Document Image Writer to a specified folder automatically? I understand and use automatic printing all the time, but I don't know how to use VBA to specify the filename and folder once it prints with the Document Image Writer.
Is it possible to do?
View 9 Replies
View Related
Apr 20, 2006
I am trying to figure out the best way to go about creating a new sheet from an existing sheet which has column titles. I guess the best thing for me to do is give an example of what I would like to have accomplished.
sheet A has the following:
title1 title2 title3 title4 title5
a b c d e
I would like sheet B to be created with:
sometitlez sometitley sometitlex
b d e
so basically, I would like to map tiltel2 to sometitlez, title4 to sometitley, and title5 to sometitlex
the reason I am doing this little project is so that I can import the new worksheet to a mysql database with only the necessary information. Please note that sheet A may contain many rows and the converted sheet B will have many rows too.
View 9 Replies
View Related
Mar 28, 2014
I have an issue creating a PDF of more than one sheet. Only top left corner of sheets are shown in PDF. Creating a PDF of a single sheet works perfectly. I have attached the result (2 pdf-files) and the original Excelfile.
Code for one sheets (Result OK):
[Code] ......
Code for multi sheets (Result not OK):
[Code] .........
Attached Files
CreatePDF.xlsm
MyPDF_OneSheet.pdf
MyPDF_3Sheets.pdf
View 2 Replies
View Related
Nov 7, 2011
I am struggling with task when i have list of cost centers (appr. 100) and for each one of them i need to create new sheet with name same as that CC.
View 1 Replies
View Related
Mar 11, 2013
Any formula to recognize and copy text from any sheet and create a list of the text items on separate sheet. Attached is a sample file I use. The text items in sheet 20 column a,b,c are items I want copied to a different sheet (list). i would like those items in the 3 columns to be copied and create a single list so I can have a count(Don't want duplicates). From there I would add another formula to give me a count.
Baby Inventory Room 2 - 2012.xlsx
View 1 Replies
View Related
Apr 29, 2009
I'm attempting to create a database on Excel 2007 to create a record of all the documents I use at work. At the moment I have an index sheet where I enter the indivudual project numbers. Is it possible in VB to take a value from this index sheet, copy an existing (template within the workbook) sheet and rename the new tab with the project number from the index?
Example:
As there will be many projects within the database is it possible to code it such that:
New Sheet1 created from template within workbook -> Tab renamed according to value of 'Index!B4'
New Sheet2 created from template within workbook -> Tab renamed according to value of 'Index!B5'
New Sheet3 created from template within workbook -> Tab renamed according to value of 'Index!B6'
and so on......
Further, is it also possible to automatically create the new sheet as soon as a project number is entered into 'Index!B4', 'Index!B5', 'Index!B6'?
ie: Text entered in 'Index!B4' -> new sheet created and renamed automatically
View 13 Replies
View Related
Jun 22, 2012
Project is shared, cannot use vba.
I have in A2 - A12, The names of different sheets in the workbook. I would like to create a link so when a user clicks on the cell, it will take them to the specified sheet.
Lets say cell A2 contains the text '1208', when pressed I would like it to open up the sheet 'A1208'
View 5 Replies
View Related
Mar 14, 2013
I'm trying to use the ActiveSheet Name as the folder name for images being imported into excel. For example, on the Sheet "Sample 1" I want to pull from the File Path "C:Documents and SettingsuserDesktopSample 1"
I'm getting an error, I think this code should work in regular VBA not sure whats wrong in excel?
Code:
Dim strSName As String
strSName.Text = ActiveSheet.Name
Const strPath As String = "C:Documents and SettingsuserDesktop" & strSName & ""
View 3 Replies
View Related
Apr 28, 2013
I've used excel to do a lot of managing stuff as far as budgets. I'm not sure if this can be done or how. I'm not to great in excel, So perhaps you can lead me a hand. I'm starting out a home based business and trying to set everything up so I'm ready to officially start. I am planning on getting a scanner to keep track of what comes in and out.
So what I wanted to try was if I scan "A" 4 times I wanted the QTY to be 4 so basically group similar Items move on to "B" and oh crap I found 10 more of "A" scan that and have it updated now to 14. You catch my drift? so I'm not sure if a statement like {if "A" is scanned then the QTY would be +1} Then the sales part would be the opposite of that statement.
View 1 Replies
View Related
Dec 11, 2013
I need to create running totals for each year of the Contract Values for each Sector that my Company deals with. There are 5 Sectors - C, M, W, WW and WtoE. Each possible contract has its own Contract Value.
For eg -
SectorContract Value
W € 36,779.33
WW € 20,325.20
W € 246.14
W € 2,168.40
WW € 176,617.00
W € 320.65
[Code]...
In the whole document we have previous year's contracts too - but I want to create running totals for each year - i.e. for 2010, 2011, 2012, 2013, 2014. How could I separate these easily?
Obviously the total depends on which sector we are looking at - I thought about using the IF formula - but realised that there would be a lot of IF's - is there an easier way of doing it? If not - what's the best way?
View 14 Replies
View Related
Jan 15, 2013
I have excel file in which each sheet will be filled by a different clients (Client1, Client 2, Client 3.. Client n).
Each sheet will have two columns "Description" and "Quantity". Client will add the descriptions and quantity.
Apart from the sheets filled by clients, the file will also have a sheet called "Summary".
After all clients filled, I need all distinct "Desciption" and "Sum Quantity of that Description" in the "Summary" sheet.
[URL]
View 1 Replies
View Related
Jul 29, 2014
I am working towards creating a spreadsheet for making a budget for a film + a system to monitor the expenses vs budget allocated on a day to day basis (to ensure the budget is not being crossed).
View 3 Replies
View Related
Aug 17, 2007
I'm trying to do is create a macro that will autopopulate information from a source sheet. What I have is a different route sheet for 25 or so technicians within my company on one worksheet.
I want to be able to have a source sheet that I can change daily and have it autopopulate the information needed into the appropriate cells/sheets from this one source sheet.
I am pretty sure there is a way to do this, but I'm not familiar enough with creating macros to do this myself, although if I had an example of one cell and a simple explanation of how to fit this to the information needed I think I could do this on my own.
View 9 Replies
View Related
Feb 6, 2012
How can I create a msg box which ask's for Yes or no option before clearing a sheet with all contents?
if code is this:
Sub Clear_sheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Sheets
If Not ws.Name = "master*" Then ws.Cells.ClearContents
Next ws
End Sub
View 4 Replies
View Related
Mar 7, 2012
I have VBA code that creates three reports based on fields a user chooses. When the user clicks the button to create the first report, links are built to the files which contain the fields they chose. There are approximately 15 files that need to be linked in every report.
When the links are built, referencing the external files, the system is extremely slow.
I have Application.ScreenUpdating = False and Application.Calculation = xlCalculationManual.
Despite these settings, the links pull in updated values.
Also, to create the last two files, I do a FIND/REPLACE to change the cells referenced in the links, causing it to choke.
would get the links in place without updating each one as it is created?
View 1 Replies
View Related
Mar 27, 2014
I have a sheet that has 5 columns as shown below, xxx represents the values within the cell that I need in each sql file.
A |B | C| D| E
test1|xxx|xxx|xxx|xxx|
test2|xxx|xxx|xxx|xxx|
test3|xxx|xxx|xxx|xxx|
test4|xxx|xxx|xxx|xxx|
test5|xxx|xxx|xxx|xxx|
What I am trying to do is take the context of each cell starting with B2, and place it in an Individual sql file (or text file with .sql extension) and name it A2 (so test1 in this case).
I tried creating a double for loop, one for last column, one for last row, taking each content and placing in file but I am not sure how to take the column A as the name of the file and to have 1 file per cell.
View 9 Replies
View Related
Apr 20, 2014
I am using Win XP Pro, Excel 2003. In the workbook, I have a invoice spread sheet (lets call it sheet1) to create invoices. Once the invoice is completed, I save it with this macro which saves it to the contents of E3 and E7 for the file name:'
Sub SaveMeExtraQUOTE()
Application.DisplayAlerts = False
' Dialog's Title
strTitle = ""My Tite""
If MsgBox("WARNING !! STOP! Enter ALL your quotes information to be saved BEFORE saving the file!!!
[Code] .......
This is working just fine BUT it keeps saving it to a template file where the master template is kept. Why will it NOT save it to the QUOTES folder when I am using this:
Filename:="C:EXCELATX Concrete DesignQUOTES"
I am also trying to have a space between the contents of cell E3 and E7 when the file name is saved. Now it just puts them together.
View 2 Replies
View Related
May 3, 2014
I have a My.xlsx file that has data for single month and I want to make a single file in which I can have contents for whole year by copying this file 11 more times in the same excel work book. Finally I would have 12 sheet in a single workbook.
E.g. Jan-14, Feb-14, .... ,Dec-14
I don't need any calender data just 11 more copies of my original sheet in a single work book.
View 3 Replies
View Related
Apr 18, 2014
I have an endless list of information that I need to turn into a text string, lookup with a validation on the end.
The easiest way is to show you so I've attached the info and what result I want.
Attached File : Test.xlsx
View 3 Replies
View Related
Feb 3, 2013
I have several tabs, 100 or so, and would like to have cost per West, South region etc onto a summary sheet. The summary must separate these costs per individual company per tab/worksheet. I'm looking for a formula, a macro or both to execute this work for me. The tab list grows every time i.e. new ones are set up all the time so the formula has to take this into consideration.
View 2 Replies
View Related
Oct 9, 2013
I am trying to create a spreadsheet that uses a selection criteria based on different sheets within a workbook to output a costing quote, anything i can use as a template? I will post the sheet that i am working on that I need to combine into a working book.
View 2 Replies
View Related
Feb 21, 2014
On the attached spreadsheet, ormula on 'UserForm2'.
When I hit the 'Submit Changes' button I want a formula so that it will look up the product row in Product List (Sheet 1) that is select in the ComboBox1.
Once this row has been found I want the values in TextBox1 to be copy and pasted into Column D of that row and value of TextBox2 to be copy and pasted into Column G of that products row.
View 10 Replies
View Related