• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Adding incremental numbers using excel vba

yan nian

New Member
hi guys,
i have two textfile and there are some field i need to add in some incremental numbers in certain formats. i've attached 3 files including a pictures to illustrates the current situations. i need some samples codes or guides on how to do this.

Currently the printscreen shows PF text files and PA text files( these current files are from 2016 dec 12), they are actually having the same ID which is 001, but i am having other PF text files and PA text files( these files are from 2016 dec 13th) which the ID is 001, but it should be 002( due to the software limitations), i need an excel vba macro files which associates with shortcut keys like ctrl + E to execute the changes from the ID 001 to 002,( something like referring back to the PF and PA textfiles from 2016 dec 12 which is ID 001 then change it to 002 for the PF and PA files on 2016 dec 13th) Is this possible?
 

Attachments

  • incremental.jpg
    incremental.jpg
    116.1 KB · Views: 9
  • PA.txt
    244 bytes · Views: 5
  • PF.txt
    1,023 bytes · Views: 5
Last edited:

Hi !

Can you post a technical explanation about the desired result
according to source text files ?
 

I do not see any link with Excel !?

The logic is to mod the initial application which creates these files …​
 
I dont have excel files for this as i need guidance and help from you guys, tips or some sample code for me to kickstart.
 

So follow Excel way : activate Macro recorder, open text file,
well answer to the assistant (data delimiter, …) :
you will have your own code base …
 
Back
Top