Counting up a number that is part of a line
-
Here is what I want to do:
I have this lineaf_100000_lead_box = 0.000001
and I want this line replicated except that the 100000 keeps counting up 3332 times
af_100001_lead_box = 0.000001
af_100002_lead_box = 0.000001until
af_103332_lead_box = 0.000001
Can someone help me with this?
-
Duplicate the row as often as you like and use the “column editor” to replace the
0000
with increasing values.The easiest way is to record a macro for a duplication and play it back as many times as necessary,
Then put the caret in the first line before the 4th 0 from the right, for example
af_10|0000_lead_box = 0.000001
( | should be the caret ) and
scroll to the last line, holdshift+alt
and click on the last 0, which should look something like this.Call
ColumnEditor
and let the values change.It is IMPORTANT that you only select as many places as you actually want to replace.
The example only selects two because I only replace two digits, otherwise the rest of the zeros would be cut off. Play with it and you will see what I mean.
-
@ekopalypse Thank you. Macro worked great, but I can´t get the step with the caret to work. This is what I get when I shift+alt:
What am I doing wrong?
EDIT: Maybe a version difference, I can mark the 00 with my mouse and then click alt+shift on the last line I want it applied to, that works fine then
-
It looks like you held down the shift key while selecting, if that is the case, no,
- click on the start position and release all keys
- scroll down to the last line and then press Shift+Alt and click the mouse on the last position to be selected.
Btw … there is no need to use services like imgur anymore, you can just paste the image from clipboard into the post.
-
@ekopalypse thanks I worked it out now, this is gonna be immensely useful in the future :)