Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Counting up a number that is part of a line

    Help wanted · · · – – – · · ·
    2
    5
    92
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Cirlot123456
      Cirlot123456 last edited by

      Here is what I want to do:
      I have this line

      af_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.000001

      until

      af_103332_lead_box = 0.000001

      Can someone help me with this?

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @Cirlot123456 last edited by Ekopalypse

        @cirlot123456

        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, hold shift+alt and click on the last 0, which should look something like this.

        f7913de0-a90b-4793-9855-4afc947a7359-image.png

        Call ColumnEditor and let the values change.

        8049fccc-0201-483b-962e-df88fb3908c8-image.png

        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.

        Cirlot123456 1 Reply Last reply Reply Quote 3
        • Cirlot123456
          Cirlot123456 @Ekopalypse last edited by Cirlot123456

          @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:

          https://imgur.com/a/n1Vek0Z

          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

          Ekopalypse 1 Reply Last reply Reply Quote 0
          • Ekopalypse
            Ekopalypse @Cirlot123456 last edited by

            @cirlot123456

            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.

            Cirlot123456 1 Reply Last reply Reply Quote 3
            • Cirlot123456
              Cirlot123456 @Ekopalypse last edited by

              @ekopalypse thanks I worked it out now, this is gonna be immensely useful in the future :)

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors