TextPad Macro Incrementing numbers +1

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
mintz87
Posts: 8
Joined: Fri Jan 22, 2010 10:42 pm

TextPad Macro Incrementing numbers +1

Post by mintz87 »

Hello,

I have been using TextPad and it's basic tools for years. Now i want to get into more of the advance stuff. I have a list:
=Datasheet!I94
=Datasheet!H94
=Datasheet!G94
=Datasheet!F94
=Datasheet!E94
=Datasheet!D94
=Datasheet!C94
That i want to increment the last 2 characters up by one

i.g.:
=Datasheet!I94
=Datasheet!H95
=Datasheet!G96
=Datasheet!F97
=Datasheet!E98
=Datasheet!D99
=Datasheet!C100

Can you tell me how to do this from scratch? i searched thru the forum on answers to other macro coding but i do not understand where and how to input the code. is it an .ini or .bat file? what language can i use? etc.

Thanks in Advance
Mintz
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

If you know in advance what number the sequence should start from, you can do this with a single search and replace action, using regular expressions:
Find what: (=Datasheet![A-Z])[0-9]+
Replace with: \1\i(94)

[X] Regular expression

Replace All
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Look in TextPad's help under
Reference Information | Regular Expressions,
Reference Information | Replacement Expressions,
How to... | Find and Replace Text | Generate Sequence Numbers and
How to... | Find and Replace Text | Use Regular Expressions.
mintz87
Posts: 8
Joined: Fri Jan 22, 2010 10:42 pm

Post by mintz87 »

After reading your post, the help docs you referred me and changing the settings in the Textpad - it is all good now.

appreciate your help!!
Post Reply