Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I am new to Excel VBA. At my work we need to validate many .txt files before we upload these .txt files for further processing. Within each ..txt files one 1 line of text contains comma separated values about 1 client. Some columns in this line of comma separated values need to be validated. In short I would like to have column validation for each row of data in the .txt file. I would like to know how to attack this issue the best way. Do I write a macro with all the necessary code to validate these .txt file entries (after importing into Excel). So that each time I need to validate a ..txt file I open up the template containing the macro and do a "Run" macro command. Or do I make use of worksheet functions and build in the conditional statements that checks for each line (after importing into Excel)? Later, I would also like to know if you can generate some sort of error messaging feature. Like some columns are required data cells and cannot be omitted. Somehow I would like to have compiled all those error messages into a new sheet, and once you click on of the error messages in the new sheet, it it will take you the original sheet to the excact entry that needs to be corrected. This little project starting to smell more like a macro. This sounds to be a big mouthful and some advice for you gurus out there is very much appreciated. Thai |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Harlan,
Thank you for the tips and insight. I will look at the options and give it a go. Thai Harlan Grove wrote: wrote... ... I would like to know how to attack this issue the best way. . . . ... Don't use Excel. What you describe is simple text file processing. There are much better tools for this than Excel, using either functions or macros within Excel. If you're running Windows 98SE, Me, 2000 or XP or Internet Explorer 5.0 or later, then you have Windows Script Host installed on your PC. The validation task you describe would require no more than 20-30 lines of VBScript code. If you're running Windows NT4, 2000 or XP, then you could even do this using batch files. That includes prompting the user to enter/correct invalid fields and writing the corrections to replacement text files. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
macro or worksheet function? | Excel Worksheet Functions | |||
Offset function referencing worksheet | Excel Discussion (Misc queries) | |||
Comparing a list to a Calendar worksheet. | Excel Worksheet Functions | |||
Excel option to store trendline's coefficients in cells for use | Charts and Charting in Excel |