Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
signed over-punch
Does anyone know how to import and convert a signed over-punch text into
Excel? I received a text file and its format includes signed over-punch chaharacters, e.g. 0025{ = 2.50, also how do I tell Excel about implied decimal. It can be either part of a vba language or function link for convertion, preferably both. Thank you in advance. Can it be nested inside a procedure or called? Where in a statement will it go? Can I create a function to call and where should I position it in my module? Below is an example of a Macro used to import the overpunch: Sub VBA() ' ' VBA Macro ' Macro recorded 1/3/2007 by Alex ' ' With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\Alex.IPC\Desktop\DLTest.txt", Destination:= _ Range("A1")) ..Name = "DLTest" ..FieldNames = True ..RowNumbers = False ..FillAdjacentFormulas = False ..PreserveFormatting = True ..RefreshOnFileOpen = False ..RefreshStyle = xlInsertDeleteCells ..SavePassword = False ..SaveData = True ..AdjustColumnWidth = True ..RefreshPeriod = 0 ..TextFilePromptOnRefresh = False ..TextFilePlatform = 437 ..TextFileStartRow = 1 ..TextFileParseType = xlFixedWidth ..TextFileTextQualifier = xlTextQualifierDoubleQuote ..TextFileConsecutiveDelimiter = False ..TextFileTabDelimiter = True ..TextFileSemicolonDelimiter = False ..TextFileCommaDelimiter = False ..TextFileSpaceDelimiter = False ..TextFileColumnDataTypes = Array(2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 5, 2, _ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 5) ..TextFileFixedColumnWidths = Array(1, 10, 5, 12, 7, 8, 11, 30, 2, 5, 3, 2, 6, 6, 6, 6, 6, 12, 15, 8, 1, _ 18, 1, 15, 3, 3, 10, 6, 12, 15, 12, 7, 2, 2, 8, 1, 3, 1, 1, 1, 2, 2, 1, 2, 10, 5, 1, 15, 4, 1, 6, 1, 9, 26, 6, 6) ..TextFileTrailingMinusNumbers = True ..Refresh BackgroundQuery:=False End With ActiveWindow.SmallScroll Down:=-9 Range("A1").Select Range("A1:AF69").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Call VBAHeader End Sub |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
signed over-punch
If I had a column of text entries like 0025, 0035, 0124 that needed to be
converted to 2.5, 3.5, 12.4 I would 1) enter 10 into any blank cell\ 2) copy this cell 3) select the column of interest 4) use Edit | Paste Special and specify Divide 5) delete the cell with 10 any help? -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Alex" wrote in message ... Does anyone know how to import and convert a signed over-punch text into Excel? I received a text file and its format includes signed over-punch chaharacters, e.g. 0025{ = 2.50, also how do I tell Excel about implied decimal. It can be either part of a vba language or function link for convertion, preferably both. Thank you in advance. Can it be nested inside a procedure or called? Where in a statement will it go? Can I create a function to call and where should I position it in my module? Below is an example of a Macro used to import the overpunch: Sub VBA() ' ' VBA Macro ' Macro recorded 1/3/2007 by Alex ' ' With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\Alex.IPC\Desktop\DLTest.txt", Destination:= _ Range("A1")) .Name = "DLTest" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlFixedWidth .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 5, 2, _ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 5) .TextFileFixedColumnWidths = Array(1, 10, 5, 12, 7, 8, 11, 30, 2, 5, 3, 2, 6, 6, 6, 6, 6, 12, 15, 8, 1, _ 18, 1, 15, 3, 3, 10, 6, 12, 15, 12, 7, 2, 2, 8, 1, 3, 1, 1, 1, 2, 2, 1, 2, 10, 5, 1, 15, 4, 1, 6, 1, 9, 26, 6, 6) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With ActiveWindow.SmallScroll Down:=-9 Range("A1").Select Range("A1:AF69").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Call VBAHeader End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing signed over-punch text into Excel | Excel Worksheet Functions | |||
Workbook Created By Signed Addin Is Itself Not Signed | Excel Discussion (Misc queries) | |||
set printer to 3 hole punch in excel | Excel Discussion (Misc queries) | |||
Calculate the time an employee signed in and out plus rate per hr | Excel Discussion (Misc queries) | |||
How can I set up a punch card in Excel? | Excel Discussion (Misc queries) |