Delete specific content in Excel












0















I have a list of data format shown below.



???m,"N0000001","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"N0000003","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"N0000004","????(M)","201407","201407","1.54956","1.54956"

???????Y,"N0000015","????(M)","201412","201412","0.95776","0.98891"


and I want to delete the 'N000000' these part. only leave the valid number. the output should like this



???m,"1","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"3","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"4","????(M)","201407","201407","1.54956","1.54956"

???????Y,"15","????(M)","201412","201412","0.95776","0.98891"


Does anyone know what kind of operation should I do?










share|improve this question

























  • is regex an option ?

    – Hamza Abdaoui
    Nov 16 '18 at 9:18






  • 1





    If it's a fixed length N000000 then Ctrl + H find and replace it... You can highlight the range to reduce potential impact elsewhere if it could occur.

    – Glitch_Doctor
    Nov 16 '18 at 9:30
















0















I have a list of data format shown below.



???m,"N0000001","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"N0000003","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"N0000004","????(M)","201407","201407","1.54956","1.54956"

???????Y,"N0000015","????(M)","201412","201412","0.95776","0.98891"


and I want to delete the 'N000000' these part. only leave the valid number. the output should like this



???m,"1","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"3","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"4","????(M)","201407","201407","1.54956","1.54956"

???????Y,"15","????(M)","201412","201412","0.95776","0.98891"


Does anyone know what kind of operation should I do?










share|improve this question

























  • is regex an option ?

    – Hamza Abdaoui
    Nov 16 '18 at 9:18






  • 1





    If it's a fixed length N000000 then Ctrl + H find and replace it... You can highlight the range to reduce potential impact elsewhere if it could occur.

    – Glitch_Doctor
    Nov 16 '18 at 9:30














0












0








0


1






I have a list of data format shown below.



???m,"N0000001","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"N0000003","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"N0000004","????(M)","201407","201407","1.54956","1.54956"

???????Y,"N0000015","????(M)","201412","201412","0.95776","0.98891"


and I want to delete the 'N000000' these part. only leave the valid number. the output should like this



???m,"1","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"3","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"4","????(M)","201407","201407","1.54956","1.54956"

???????Y,"15","????(M)","201412","201412","0.95776","0.98891"


Does anyone know what kind of operation should I do?










share|improve this question
















I have a list of data format shown below.



???m,"N0000001","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"N0000003","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"N0000004","????(M)","201407","201407","1.54956","1.54956"

???????Y,"N0000015","????(M)","201412","201412","0.95776","0.98891"


and I want to delete the 'N000000' these part. only leave the valid number. the output should like this



???m,"1","????(M)","201405","201405","0.57674","0.60831"

???{???Y,"3","????(M)","201402","201402","0.78170","0.68470"

?}???n?j?`??,"4","????(M)","201407","201407","1.54956","1.54956"

???????Y,"15","????(M)","201412","201412","0.95776","0.98891"


Does anyone know what kind of operation should I do?







excel vba excel-vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 11:03









Pᴇʜ

24.9k63052




24.9k63052










asked Nov 16 '18 at 9:16









J.FengJ.Feng

15




15













  • is regex an option ?

    – Hamza Abdaoui
    Nov 16 '18 at 9:18






  • 1





    If it's a fixed length N000000 then Ctrl + H find and replace it... You can highlight the range to reduce potential impact elsewhere if it could occur.

    – Glitch_Doctor
    Nov 16 '18 at 9:30



















  • is regex an option ?

    – Hamza Abdaoui
    Nov 16 '18 at 9:18






  • 1





    If it's a fixed length N000000 then Ctrl + H find and replace it... You can highlight the range to reduce potential impact elsewhere if it could occur.

    – Glitch_Doctor
    Nov 16 '18 at 9:30

















is regex an option ?

– Hamza Abdaoui
Nov 16 '18 at 9:18





is regex an option ?

– Hamza Abdaoui
Nov 16 '18 at 9:18




1




1





If it's a fixed length N000000 then Ctrl + H find and replace it... You can highlight the range to reduce potential impact elsewhere if it could occur.

– Glitch_Doctor
Nov 16 '18 at 9:30





If it's a fixed length N000000 then Ctrl + H find and replace it... You can highlight the range to reduce potential impact elsewhere if it could occur.

– Glitch_Doctor
Nov 16 '18 at 9:30












2 Answers
2






active

oldest

votes


















1














Try this.



Sub test()
Dim rngDB As Range
Dim Ws As Worksheet
Set Ws = ActiveSheet
Set rngDB = Ws.UsedRange
rngDB.Replace "N000000", ""

End Sub





share|improve this answer































    0














    your data list is very unclear. Assuming the data commening with N000000 is in an individual cell, the formula you could use would be:



    for data in cell A1, place formula in cell B1:



    with ';' as a delimiter:



    =right(A1;LEN(A1)-LEN("N000000"))


    with , as delimiter



    =right(A1,LEN(A1)-LEN("N000000"))





    share|improve this answer
























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334725%2fdelete-specific-content-in-excel%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Try this.



      Sub test()
      Dim rngDB As Range
      Dim Ws As Worksheet
      Set Ws = ActiveSheet
      Set rngDB = Ws.UsedRange
      rngDB.Replace "N000000", ""

      End Sub





      share|improve this answer




























        1














        Try this.



        Sub test()
        Dim rngDB As Range
        Dim Ws As Worksheet
        Set Ws = ActiveSheet
        Set rngDB = Ws.UsedRange
        rngDB.Replace "N000000", ""

        End Sub





        share|improve this answer


























          1












          1








          1







          Try this.



          Sub test()
          Dim rngDB As Range
          Dim Ws As Worksheet
          Set Ws = ActiveSheet
          Set rngDB = Ws.UsedRange
          rngDB.Replace "N000000", ""

          End Sub





          share|improve this answer













          Try this.



          Sub test()
          Dim rngDB As Range
          Dim Ws As Worksheet
          Set Ws = ActiveSheet
          Set rngDB = Ws.UsedRange
          rngDB.Replace "N000000", ""

          End Sub






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 16 '18 at 11:26









          Dy.LeeDy.Lee

          3,6721511




          3,6721511

























              0














              your data list is very unclear. Assuming the data commening with N000000 is in an individual cell, the formula you could use would be:



              for data in cell A1, place formula in cell B1:



              with ';' as a delimiter:



              =right(A1;LEN(A1)-LEN("N000000"))


              with , as delimiter



              =right(A1,LEN(A1)-LEN("N000000"))





              share|improve this answer




























                0














                your data list is very unclear. Assuming the data commening with N000000 is in an individual cell, the formula you could use would be:



                for data in cell A1, place formula in cell B1:



                with ';' as a delimiter:



                =right(A1;LEN(A1)-LEN("N000000"))


                with , as delimiter



                =right(A1,LEN(A1)-LEN("N000000"))





                share|improve this answer


























                  0












                  0








                  0







                  your data list is very unclear. Assuming the data commening with N000000 is in an individual cell, the formula you could use would be:



                  for data in cell A1, place formula in cell B1:



                  with ';' as a delimiter:



                  =right(A1;LEN(A1)-LEN("N000000"))


                  with , as delimiter



                  =right(A1,LEN(A1)-LEN("N000000"))





                  share|improve this answer













                  your data list is very unclear. Assuming the data commening with N000000 is in an individual cell, the formula you could use would be:



                  for data in cell A1, place formula in cell B1:



                  with ';' as a delimiter:



                  =right(A1;LEN(A1)-LEN("N000000"))


                  with , as delimiter



                  =right(A1,LEN(A1)-LEN("N000000"))






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 16 '18 at 9:46









                  LambikLambik

                  500513




                  500513






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334725%2fdelete-specific-content-in-excel%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      List item for chat from Array inside array React Native

                      Thiostrepton

                      Caerphilly