Automatically Create Tables From ASCII Files

Dec 3, 2009

I've written a program to read data into a custom table from ASCII
files. The ASCII files are created from a VB script I've added to an Excel
spreadsheet. The VB script in Excel is the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim str_fileName As String
Dim int_fileNum As Integer
Dim str_fileName2 As String
Dim int_fileNum2 As Integer
MsgBox "Testing"
str_fileName = "\EPCOR02COLLECTSinto.txt"
str_fileName2 = "\EPCOR02COLLECTDisa.txt"
Application.EnableEvents = False
If (Target.Address = "$D$2") Then
'Write to the Sinto file
On Error Goto Err_CreateOutputFile
int_fileNum = FreeFile...............................

View 2 Replies


ADVERTISEMENT

Automatically Create Csv Files From Columns

Apr 9, 2008

I have an excel worksheet with data from A to T and the numbers of rows may change from use to use. I want to create a button/macro that determines where the data ends and will take the data from two columns, say column A and column D and put it in a new csv file.

In my final product, I would really like to be able to have a set of check boxes that say "Column D", "Column E", ... "Column T" and so if I check TWO boxes, say "Column D" and "Column T" and click create, it will output TWO csv files, one with Column A and Column D and the other with Column A and Column T.

View 5 Replies View Related

Automatically Make New Tables?

Nov 10, 2009

I got a excel file which i use to add invoices on. But these invoices are numbered and in a book.
1 book has 50 pages, i have to write the amount of $$ on it. But i made this file to enter the amount of money on the invoice. And the sheet automatically gives me the total amount of money which was earned when the book is full.

Now i was wondering if its possible to let excel somehow add 50 new lines with the same formulas used in the first 50 lines. So once line 50 has info enter, excel will add 50 new ones with the correct info(book and page numbers).

Can excel do this with some sort of macro?

View 14 Replies View Related

How To Merge Several Tables Automatically

Oct 11, 2013

I have a table. I give this table to 3 different people. Each one fills information in their corresponding table.

How do I do it, so their information gets feeded into my table, without overwriting each other.

View 3 Replies View Related

Create Tables From XML With CSS

Jun 1, 2006

how to create tables from XML with CSS.Below are the codes....

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="feedrecipe.css"?>

<recipe_summary>

< percentages>Percentages</percentages>

<percentages>
<eggshells_heading>Eggshells</eggshells_heading>
<eggshells>5%</eggshells>
<wheat_heading>Wheat</wheat_heading>
<wheat>60%</wheat>
<sunflower_heading>Sunflower Seeds</sunflower_heading>
<sunflower>5%</sunflower>
<meat_heading>Meat and Bone Meal</meat_heading>
<meat>10%</meat>..................................

View 4 Replies View Related

Extracting / Importing Tables From Several Word Files To Excel File

Jul 17, 2013

I have several word Files which has standard letter format and contains some tables which needs to be extracted / imported to Excel sheet

The File name is "employee name" which also needs to be extracted , if possible in same excel file.

Attached is the sample of word file. There are 3 tables which needs to be extracted

I have several files and I want to avoid doing it manually.

View 2 Replies View Related

Update Pivot Tables Automatically After X Minutes

Feb 17, 2014

trying to get pivot tables to automatically update every 4 minutes.

I have 3 worksheets:

worksheet 1: SCANNER, this sheet pulls in data externally using an =RTD links

worksheet 2: RAW, this manipulates the data above, and this is the data used to create the pivot tables

worksheet 3: SUMMARY, the pivot tables are here, there are 9 of them.

Worksheet RAW, changes every so often, and every 4 minutes I would like to have the pivot tables AUTO REFRESHto make sure its using the latest data from RAW.

I see options to autorefresh on the opening of the workbook, but cant see anything to REFRESH EVERY X MINUTES.

Is there any way to do this with VBA ?

View 3 Replies View Related

Automatically Populating Tables Between Excel Sheets?

Dec 5, 2011

Sheet one has seperate logs for each item received in January and the reasons they were returned - so if you can imagine ( note / demonstrates column seperation) the following column headings: Date received / item description / approved within 1 day / returned for high risk.

On sheet 2: i've got a simplified data table which tells me that in January, there were 10 occurances of items approved within 1 day; and 8 occurances of items returned for high risk.

So sheet 2 looks like this:

01 Jan 2012 / 31 Jan 2012 / approved within 1 day / returned for high risk

I'm trying to get it so that any data input into sheet 1 for January will automatically update these columns in sheet 2.

This is what i've attempted to do:

what is the sum of the "1's" demonstrating occurances of "approved within 1 day" in sheet 1: Sheet1!J15:J179

if the date received in sheet 1 is between 1 Jan 2012 and 31 jan 2012 sheet 2: TODAY(Sheet1!D15:D179>Sheet2!A14
So at the moment i've got:

=SUMPRODUCT(Sheet1!J15:J179)*TODAY(Sheet1!D15:D179>Sheet2!A14

View 1 Replies View Related

Automatically Refresh Pivot Tables After Data Entry

Mar 20, 2009

This is the first time I’ve tried to use VBA. I’m using Excel 2000. In my excel workbook have 1 sheet called “Cards” in which I Change data in one cell $B$2 (enter a part number) and formulas in this sheet return many values from another sheet “Card Data”. In the “Card Data” sheet, formulas that look through a sheet “Sales Book” and return the data that pertains to the Part Number I entered in the sheet “Cards”. In the sheet “Card Data” there are 3 pivot tables (“PH CALC”, “PH QTY”, and “Pivot Table 3”) that use the Part Number data to show 3 different sets of information. The pivot tables are the source for 3 charts in the “Cards” Sheet.

Problem: Pivot tables don’t automatically refresh. I would like to use VBA code to automatically refresh the pivot tables in the “Card Data” sheet when I change the Part Number in cell $B$2 of the “Cards” sheet, which, in turn, would then update my charts in the “Cards” sheet.

View 3 Replies View Related

Information To Enter The Tables And Then Automatically Move Into The Next Available Cells Below

Sep 23, 2008

I am trying to use visual basic editor in excel. I have all ready set up my user form where information can be entered, but I ave having trouble getting the information that is entered in the user form into the correct cells in excel.

I am wanting my information to enter the tables and then automatically move into the next available cells below.

Private Sub cmdadd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("details of cars in stock")
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
If Trim(Me.txtreg.Value) = "" Then
Me.txtreg.SetFocus
MsgBox "please enter a registraion number"
Exit Sub
End If
ws.Cells(iRow, 1).Value = Me.txtreg.Value
Me.txtreg.Value = ""

View 9 Replies View Related

Pivot Tables - Create New Fields On The Fly?

Feb 1, 2010

it's possible to create new fields (variables/columns) on the fly (without adding them to the original data table).

For this example, assume I have a column for:
job code estimated hours
job code actual hours
total estimated hours
total actual hours

Excel has made it easy to run averages or sums for any of those columns, but what if I want to see what the average proportion for job code estimated hours/ total estimated hours? Is there an easy way to do it with pivot tables without adding a column to my database? I'm working in Excel 2007, my data table size is approximately 100 columns by 200 rows.

View 2 Replies View Related

Macro Create Pivot Tables?

Jun 27, 2007

I created a macro by using the macro recorder. It creates some columns and formulas and does some formatting, then it is to take the data and create some pivot tables.

for some reason it gets stuck on the first pivot table. It creates it, but it wont add the first field to the table.

View 4 Replies View Related

Macro To Create Pivot Tables

Oct 22, 2006

I have recorded a Macro to create Pivot Tables, I would like this to run in any workbook. The problem is that every time a Pivot Table is generated Excel alters the number of the table(Pivot Table options). This then does not match that in the Macro as below("PivotTable1").

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R37C6").CreatePivotTable TableDestination:="", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet. Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("GAME")
.Orientation = xlRowField
.Position = 1
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("LANGUAGE")
.Orientation = xlRowField
.Position = 2

View 2 Replies View Related

Create List Based On Tables

Sep 30, 2007

ive got 1 sheet,with 2 printable pages in it. 1 being the summery page and 1 being the inventory page.

what i would like to be able to do is.
on the summery bit ive got a code in A22 and a number in G22
to save me time i need to create a list in the inventory bit starting at A62

im hoping it will look somthing like this

A62 = what ever the code is ( JR269 ) in A22
A63 = same code and so on until i have 26 in a list, 26 being G22

View 9 Replies View Related

Create Summary Table From 2 Tables

Apr 15, 2008

I have 2 worksheets which have a table on each. I would like to create a list using data from both tables. The list I am looking to create is for an upload fom an excel planning sheet into an ERP system and requires certain data fields and a certain format. Both table have the same amount of fields and the dates across the top. On worksheet one there are material numbers on the left and dates across the top. In the list I require I would need the dates down the left in the first column, next the material number, next the quantity from table one and then the last column I would require the value from the second worksheet which is relevant to the material number and date from the first table. I have tried pivot tables but cannot get this to work and feel it may work with a lookup. I have attached an example of the data.

View 2 Replies View Related

Create Trend Analysis Using Excel Tables?

May 24, 2014

I need to create some trend analysis for Vehicle sales. I have attached a file with sample data.

There are few problems i am facing like description has all the vehicle details which are not in any particular order, even if some how i manage to separate these then too many variables are not letting me come to any conclusion for example make, model, mileage, year of registration color of vehicle, auction sold, sale price, cap (bench mark for pricing).

what i need to produce is which auction sells certain vehicles best or which color of certain model sells best.

[URL]

View 1 Replies View Related

Create Matrix Of Pricing By Conditions From Tables

Aug 21, 2008

i have many tables for many carriers with the same format, and i need to create a unified table of them, the tables look like this

-------A---------------------B-----------------------C---------
----Destination----------Country_Code-----------Price_Per_Minute
1------UK-------------------4479-------------------0.256-----
2------USA------------------1148------------------0.300------
3------Jordan----------------9626------------------0.899------
4------India------------------9198------------------0.345------

so let us consider that these are the prices for X company and i have another ten tables for other 10 companies, what i need to do is to create a unified table that includes all the companies prices for all the destination depending on the Country_Code as it could be considered as a primary Key and without any duplications and to include the all the data in all the tables as some destinations and prices are not available in all the tables, so the tables contains different data, the unified table should look something like this

-------A----------------B----------------C------------D---------E------
----Destination-------Country_Code-----X Price-----Y Price----Z Price----
1------UK-----------------4479-----------0.256-----0.254------0.356----
2------USA---------------1148------------0.300-----0.876------ ---
3------Jordan-------------9626-----------0.899------0.987------0.324---
4------India---------------9198-----------0.345----- -------0.564--

View 6 Replies View Related

Create Unique List & AutoFilter 2 Tables By Same Value

Mar 23, 2008

I have a table and say I would like to create a unique list from column2 and store the list in a spearate sheet. Give this unique list a name.

Use this unique list in a FOR EACH loop and apply autofilter to two tables on two different sheets.
(one table is from which the unique list was created and other in a different sheet)

View 4 Replies View Related

Create Addin That When Clicked Refreshes All Pivot Tables?

Mar 12, 2012

I am trying to create an addin that when clicked refreshes all pivot tables and queries insteading of using the right click refresh or refreshall option button. This is part of a larger project which requires the addin -vs- the built in functionality. Anyways...the following script if I put it in a button and run it...it works perfect....if saved and run as an addin it blows past the refresh code and does not refresh anything, but will cycle through each worksheet.

I also tried thisworkbook.refreshall and activeworkbook.refreshall and neither worked.

Code:
Dim wks As Worksheet
Dim p As PivotTable
Dim qt As QueryTable

[Code]...

View 1 Replies View Related

Macro To Create Pivot Tables And Sort Out Data In Other Worksheet

May 19, 2009

The first sheet is the row data given to me, the second one is where I want my data to be analysed automatically by macros.

I managed to create a pivot table manually to give me the info I want but then I still have to copy all the results from the pivot table sheet to my analysis sheet.

How can I create a macro able to do all that by it self? I tried to record a macro using the recorder but then when I try to play it it gives me an error straight at the beginning in the definition of the pivot table I think.

An example of what I want the pivot table to do is:
in the first sheet, go in the small table in column K and L, take the value of L1, then in the row data in column A to J, in column C look for the value in L1, once found, look for the value 1 in column J then do the average on the values in column E and put the result in my second sheet in cell F5
then do the same but look for 2 in column J and put it in F8, then 3 in F11, ... until 7 found (the data is in ss.000 and so the results in the second sheet should be formated the same way)
then do the same all over again for value in L2
etc etc etc

this should be done for the 6 values in column L, each having values up to 7 in the J column.

Then I need to do the same for other columns and not only averages but minimums as well but I can adapt the code I think.

View 14 Replies View Related

Create Large Table From Smaller Tables When Columns Not In Same Order

Jul 17, 2014

I have a lot of data to try and summarize but they are in multiple smaller tables. I wish to only extract 2 variables, 'number' and 'total' from all of my smaller tables (lots of them) so the problem looks like this, i have these tables for example where the 'total' title is in a different column depending on which of the smaller tables you are looking at:

cat 1
cat 2
cat 3
total

[Code]....

I am trying to get:

number
Total
123456
30
234567
60

[Code]...

Because the number column is fixed and all of the smaller tables will all have a number in the same column maybe i can insert a column next to the number column and say "find the value where the column title is 'total' - however the location of the column title would change so not sure if this would work? I was also thinking of sorting the columns but that will not work either because of the smaller multiple tables?

View 4 Replies View Related

ASCII Code For Character

May 20, 2009

Find the ASCII character code for the characters in cells A3-D3? I have a problem importing data into the database because of these cells. They have some weird properties: ISBLANK would return them FALSE; however if I leave blank space in "Find and Replace" it will find and replaces those cells together with cells which are genuinely blank. So I could theoretically go and replace all blank cells to some character (for example ^), then do the opposite and replace ^ into blank and it would solve the problem, but I am curious as to what exactly this character is.

View 14 Replies View Related

In Search Of ASCII Characters

Nov 13, 2006

I have a sheet A1:R456 provided from an outside source, with many large text entries. In some of them appear various ascii strings such as, but not exclusively: •

It appears these have replaced apostrophe's, dashes, and other types of punctuation and formatting (bullets, etc).

I have used the Find (Ctrl-F) to locate some, but it only works if you know what you're looking for. According to Excel HELP! :o Clean() only strips the lower 32 ascii codes, and I'm pretty sure these are at the high end of the ascii chart.

I don't want to remove them, I want to replace them, but I'm not sure if it should be an apostrophe, a dash, or whatever. So I'd be happy to find them and I'll fix it as best I can.

Any VBA code to locate all cells in a range that contain any high-order ascii (say above 127) and fill with yellow?

View 9 Replies View Related

ASCII Key Mapping In VB Userform

Jan 4, 2007

Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = Chr(vbKeyA) Then
If sngXFactor 1 Then
sngXFactor = -1
sngYFactor = 0
End If
ElseIf KeyAscii = Chr(vbKeyW) Then
If sngYFactor -1 Then
sngXFactor = 0
sngYFactor = -1
End If
ElseIf KeyAscii = Chr(vbKeyD) Then
If sngXFactor -1 Then
sngXFactor = 1
sngYFactor = 0
End If
ElseIf KeyAscii = Chr(vbKeyS) Then
If sngYFactor 1 Then
sngXFactor = 0
sngYFactor = -1
End If
End If
End Sub

That is what I have right now, basically I just want to map W, A, S, and D to change variables. What am I doing wrong?

Keep in mind that this is a userform and not an excel worksheet.

View 9 Replies View Related

Create Report Table From Two Original Tables (source And Select Criteria)

Mar 31, 2014

I have two tables (Table 1 and Table 2). Table 1 has names of all employees in my organization ('Name' column) and corresponding information in the second column ('Textinfo'). I need to create Table 3 from table 1, but only select those employees who are in my team, ie matching names in the Table 2. I also need to extract corresponding 'Textingo' column information. I tried vlookup but it did not work because if there more that one name in the table 1, vlookup confuses it (i think). Would you know what function or code to use?

Sample file is attached : excel question 1.xlsx

View 2 Replies View Related

Convert ASCII Characters To Hex Values?

Jun 9, 2014

Is there an easy way to convert ascii characters to their equivalent hex value, such as 0 = 30?

View 6 Replies View Related

Hex To ASCII Conversion Formula In Excel

Apr 17, 2002

I know you can create a DEC2HEX formula. I wanted to convert Hex to Ascii.

When I use HEX2DEC, it puts the ASCII number instead of the actual character.

For instance, if I put the HEX number 4A in Cell A1, I want Cell A2 to display a capital J instead of the number 74 which is J in ASCII.

View 4 Replies View Related

Ascii File Import Malfunctioning

Aug 31, 2009

I am importing multiple ascii files into one workbook, each file into a single sheet of the workbook. When I manually import an ascii file, everything works and formats fine. When I import the file or files with my macro, the formatting of the values in the ascii file isnt working correctly, that is, if a value is for instance 51,442 (, being the decimal seperator), it is input to the cell as 51,442, as in fifty one thousand, four hundred forty two..My import function is below, and I have tried various combinations of using the decimal seperator command and thousands seperator command, all to no avail..

Lastly, in case it matters, this is on a PC with regional settings set to Germany as well.

Below an example of the import which I found online earlier..

x = 1
Set wkbTemp = Workbooks.Open(Filename:=FilesToOpen(x))
wkbTemp.Sheets(1).Copy
Set wkbAll = ActiveWorkbook
wkbTemp.Close (False)
wkbAll.Worksheets(x).Columns("A:A").TextToColumns _
Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, _
Other:=False, DecimalSeparator:=","
x = x + 1

View 9 Replies View Related

Import ASCII File Into Excel Spreadsheet?

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

Macro To Format Number/ Export Ascii

Apr 3, 2008

I have some dates that I want to reformat. The file is an ascii text file, and I have imported this into excel. There are 7 and 8 character lengths

3122007
10122007

I want the dates to be all 8 characters (with a zero in front of the 7 character dates), and also I want to reverse the format, so it will read 20071203

I have a number of methods but nothing has worked yet.

After this I plan to export the file as a comma separated ascii txt file. I managed to import it, but I'm not sure how to export it.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved