Page 1 of 1
Macro Issue
Posted: Tue Oct 23, 2012 8:12 pm
by pixar1264
I have created a macro to move around some numbers in Textpad 5. It works perfectly, except for the first line that it has to make the adjustments on, it makes the adjustment twice. Every other correction that it is making (moving one digit back up onto the line it was pushed off of) is good. Any ideas? I've tried recreating the macro multiple times in different ways and I keep getting the same result. Thank you!!
Posted: Tue Oct 23, 2012 8:28 pm
by ak47wong
It might help if you could precisely list the steps in the macro.
Posted: Tue Oct 23, 2012 9:22 pm
by ben_josephs
... and precisely explain what you're trying to do.
Posted: Tue Oct 23, 2012 9:40 pm
by pixar1264
Ok, I'm going to try my best to explain. It is probably something simple and I just started a new position that has me working with these macros, so please bare with me.
I have a file that gets pulled into textpad that was created with size limits on the columns. There is a field with a dollar amount that only holds 7 spaces, so any dollar amount of $1,000.00 or more, the last digit gets pushed down into the next row, so it shows as 1,000.0 then the last 0 goes underneath the one in the next row. I have created a 2 macros that complete this function. The first macro locates the rows with the one digit and bookmarks them. The second macro then finds the "next bookmark", I arrow over to the digit, copy it and then paste it in its proper position (in an earlier step, I added extra space to the dollar amount column so that the format of the file will remain with the additional digit there). I then hit home, the down arrow twice to get it below the original bookmarked line and stop recording. I then reopen the file to start the cleanup from scratch and run the macros. Every bookmarked line, with the exception of the first one, ends up exactly how it is supposed to. The bookmarked line is the only one that winds up showing as ,000.000 with the first digit disappearing because the amount of spaces does not allow for it.
Phew, I hope that makes some sense. Let me know if you have any additional questions. Thank you!!
Posted: Tue Oct 23, 2012 10:09 pm
by ben_josephs
Please provide examples of your text as it is and how you'd like it. Enclose them in [​code]...[/code] tags.