• Login
Community
  • Login

Find replace with itiration

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
13 Posts 2 Posters 518 Views
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.
  • N
    NAGARAJGOUDA PATIL
    last edited by NAGARAJGOUDA PATIL May 17, 2022, 4:23 AM May 17, 2022, 4:21 AM

    I have 2 lines of code in xml
    <EA Na=“M_SUP_AH#Start” VL=“M_SUP_AH” O=“R”/>
    I pasted same code 54 times
    <EA Na=“M_SUP_AH#Start” VL=“M_SUP_AH” O=“R”/>
    <EA Na=“M_SUP_AH#Start” VL=“M_SUP_AH” O=“R”/>
    <EA Na=“M_SUP_AH#Start” VL=“M_SUP_AH” O=“R”/>
    <EA Na=“M_SUP_AH#Start” VL=“M_SUP_AH” O=“R”/>

    i have 54 items in excel
    1.sate_1
    2.state_2
    3.state_hey
    4.state_4
    5.state_hi

    54.hi_heyy
    55.der

    SO want to replace M_SUP_AH of each line with data in excel 1 by 1
    and final result should be
    <EA Na=“sate_1#Start” VL=“sate_1” O=“R”/>
    <EA Na=“sate_2#Start” VL=“sate_2” O=“R”/>
    <EA Na=“sate_hey#Start” VL=“sate_hey” O=“R”/>
    <EA Na=“sate_4” VL=“sate_4” O=“R”/>

    <EA Na=“der#Start” VL=“der” O=“R”/>

    N 1 Reply Last reply May 17, 2022, 4:24 AM Reply Quote 0
    • N
      NAGARAJGOUDA PATIL @NAGARAJGOUDA PATIL
      last edited by May 17, 2022, 4:24 AM

      @GUY038 can you help me

      N 1 Reply Last reply May 17, 2022, 6:22 AM Reply Quote 0
      • N
        Neil Schipper @NAGARAJGOUDA PATIL
        last edited by May 17, 2022, 6:22 AM

        @nagarajgouda-patil Do you know how to perform the text concatenate operation in Excel?

        If you do, what would be the advantage of doing a F&R in Npp when you can construct the needed text in Excel?

        If you don’t, it’s worth your while to learn it.

        In OpenOffice, this cell formula creates text by joining three pieces, two specified in the command and one drawn from another cell:

        =CONCATENATE("Some canned text";A1;"Other canned text")

        (As I recall it’s the same in Excel but if not it will be close.)

        One way I can imagine being wrong is if your original data has the leading numbers as you’ve shown, like 3.state_hey and you need to strip each one off, and only use state_hey in the newly built text. In that case, it could be justified to first transfer the column to an Npp text doc. This is easy but I won’t guess if it’s your actual need.

        N 2 Replies Last reply May 17, 2022, 6:51 AM Reply Quote 1
        • N
          NAGARAJGOUDA PATIL @Neil Schipper
          last edited by May 17, 2022, 6:51 AM

          @neil-schipper
          data in excel is
          state1
          state2
          state_hey
          state_4

          i need both find and repalce

          1 Reply Last reply Reply Quote 0
          • N
            NAGARAJGOUDA PATIL @Neil Schipper
            last edited by May 17, 2022, 6:52 AM

            @neil-schipper
            =CONCATENATE is for joining nly

            N 1 Reply Last reply May 17, 2022, 6:55 AM Reply Quote 0
            • N
              Neil Schipper @NAGARAJGOUDA PATIL
              last edited by Neil Schipper May 17, 2022, 6:58 AM May 17, 2022, 6:55 AM

              @nagarajgouda-patil
              Are you not joining

              <EA Na=“ + state_1 + #Start” VL=“ + state_1 + ” O=“R”/>

              ??

              N N 2 Replies Last reply May 17, 2022, 6:57 AM Reply Quote 0
              • N
                Neil Schipper @Neil Schipper
                last edited by May 17, 2022, 6:57 AM

                @neil-schipper Are you literally needing to convert state to sate (which I assumed was a typo)?

                1 Reply Last reply Reply Quote 0
                • N
                  NAGARAJGOUDA PATIL @Neil Schipper
                  last edited by NAGARAJGOUDA PATIL May 17, 2022, 7:00 AM May 17, 2022, 6:58 AM

                  Screenshot (49).png

                  N N 2 Replies Last reply May 17, 2022, 7:01 AM Reply Quote 0
                  • N
                    NAGARAJGOUDA PATIL @NAGARAJGOUDA PATIL
                    last edited by May 17, 2022, 7:01 AM

                    @nagarajgouda-patil here i did find - and replace but individually i need formula

                    N 1 Reply Last reply May 17, 2022, 7:06 AM Reply Quote 0
                    • N
                      Neil Schipper @NAGARAJGOUDA PATIL
                      last edited by May 17, 2022, 7:01 AM

                      @nagarajgouda-patil So your need is complete;y fulfilled, right?

                      N 1 Reply Last reply May 17, 2022, 7:05 AM Reply Quote 0
                      • N
                        NAGARAJGOUDA PATIL @Neil Schipper
                        last edited by May 17, 2022, 7:05 AM

                        @neil-schipper
                        i need formaula
                        what i did in uploaded excel is manual find and replace
                        i have 100s of data like this

                        1 Reply Last reply Reply Quote 0
                        • N
                          Neil Schipper @NAGARAJGOUDA PATIL
                          last edited by May 17, 2022, 7:06 AM

                          You dumped an image with no explanation. Is the result column hand-crafted by you to demonstrate needed output, or did you use a formula (with concatenate command)?

                          but individually i need formula

                          I’m not sure what you mean. Do you know how to look through Excel’s help documentation for formula commands?

                          N 1 Reply Last reply May 17, 2022, 7:07 AM Reply Quote 0
                          • N
                            NAGARAJGOUDA PATIL @Neil Schipper
                            last edited by May 17, 2022, 7:07 AM

                            @neil-schipper
                            thanks for your help

                            1 Reply Last reply Reply Quote 0
                            4 out of 13
                            • First post
                              4/13
                              Last post
                            The Community of users of the Notepad++ text editor.
                            Powered by NodeBB | Contributors