Dear VBA forumers and guides,
I need a small example to guide me to read my entire excel data and match certain columns, and output certain selected columns to a .txt file. Have a file of around 300 columns and 1000 rows. (Using 2007 Excel)
To be more clear,
Out of my Excel sheet I want only Drive Type Date ID TagName Description QTY DID values in my text file.
In my excel file I have a header field called DriveType and that data should be only CDD and if its anything else then reading of that row should be abandoned. (I mean the reading of other data shouldn't happen!!)
Secondly have a set of numbers(basically frequencies) in my header file and for every no in header have a corresponding value in rows. It can be blank or some numeric value. In case my numeric value is an n or n.5 (where n can be 1,2,3,...etc) then it should be written to the .txt file else not.
I also need to have a counter which keeps the count as to how many numeric values are found for each sale ID.(it is one of the header fileds which is important in my text file) and also need to remember the frequency where the value first occurred.
The second part of help I need is to go about formatted output. I need the fields in the text file output to have exactly 8 characters long. (I am clueless how to do this!!)
Brief example of my Excel data is attached.
Hope some one can help me!!
Thanks.
Bookmarks