Runtime Error 13 on cell not in Range Announcing the arrival of Valued Associate #679: Cesar...

Does Prince Arnaud cause someone holding the Princess to lose?

Raising a bilingual kid. When should we introduce the majority language?

What came first? Venom as the movie or as the song?

Why do people think Winterfell crypts is the safest place for women, children & old people?

What is her name?

How to mute a string and play another at the same time

How to make an animal which can only breed for a certain number of generations?

What is the difference between 准时 and 按时?

Why do C and C++ allow the expression (int) + 4*5?

Etymology of 見舞い

Why doesn't the university give past final exams' answers?

How to break 信じようとしていただけかも知れない into separate parts?

Is my guitar’s action too high?

Can the van der Waals coefficients be negative in the van der Waals equation for real gases?

How was Lagrange appointed professor of mathematics so early?

If gravity precedes the formation of a solar system, where did the mass come from that caused the gravity?

Why not use the yoke to control yaw, as well as pitch and roll?

How do I deal with an erroneously large refund?

Protagonist's race is hidden - should I reveal it?

Are Flameskulls resistant to magical piercing damage?

Is "ein Herz wie das meine" an antiquated or colloquial use of the possesive pronoun?

Assertions In A Mock Callout Test

Is Vivien of the Wilds + Wilderness Reclamation a competitive combo?

How to keep bees out of canned beverages?



Runtime Error 13 on cell not in Range



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Excel 2007: Conditional formatting so that each row shows low values yellow, high values redLocking cell range in ExcelDynamically insert value into cellVBA Code for changing background text for any text within a cellHow do I update a cell (automatically) based on a Random Result in another cell in Excel 2003?Runtime 1004 error involing DateExcel VBA: Creating Hyperlinks Type MismatchHow can I link a cell to another when the source cell location might change?VBA code that skips a row instead of “For Each row In rng.Rows”Excel Cell Referencing





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am working on a simple spreadsheet that changes characters when you click on the cell, then counts the cells that are of a certain character. I have set the range to only look at certain cells (A3:A27, B3:B27) but anytime I click on row 1 I get a Runtime Error 13. This row is outside of the selected Range. Here is my code.



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rng As Range

Set rng = Range("A3:A27,B3:B27")
If Target.Value = Chr(254) Then
Target.Value = Chr(168)
Cancel = True
ElseIf Target.Value = Chr(168) Then
Target.Value = Chr(254)
Cancel = True
End If
End Sub









share|improve this question









New contributor




user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    I am working on a simple spreadsheet that changes characters when you click on the cell, then counts the cells that are of a certain character. I have set the range to only look at certain cells (A3:A27, B3:B27) but anytime I click on row 1 I get a Runtime Error 13. This row is outside of the selected Range. Here is my code.



    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim rng As Range

    Set rng = Range("A3:A27,B3:B27")
    If Target.Value = Chr(254) Then
    Target.Value = Chr(168)
    Cancel = True
    ElseIf Target.Value = Chr(168) Then
    Target.Value = Chr(254)
    Cancel = True
    End If
    End Sub









    share|improve this question









    New contributor




    user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I am working on a simple spreadsheet that changes characters when you click on the cell, then counts the cells that are of a certain character. I have set the range to only look at certain cells (A3:A27, B3:B27) but anytime I click on row 1 I get a Runtime Error 13. This row is outside of the selected Range. Here is my code.



      Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      Dim rng As Range

      Set rng = Range("A3:A27,B3:B27")
      If Target.Value = Chr(254) Then
      Target.Value = Chr(168)
      Cancel = True
      ElseIf Target.Value = Chr(168) Then
      Target.Value = Chr(254)
      Cancel = True
      End If
      End Sub









      share|improve this question









      New contributor




      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am working on a simple spreadsheet that changes characters when you click on the cell, then counts the cells that are of a certain character. I have set the range to only look at certain cells (A3:A27, B3:B27) but anytime I click on row 1 I get a Runtime Error 13. This row is outside of the selected Range. Here is my code.



      Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      Dim rng As Range

      Set rng = Range("A3:A27,B3:B27")
      If Target.Value = Chr(254) Then
      Target.Value = Chr(168)
      Cancel = True
      ElseIf Target.Value = Chr(168) Then
      Target.Value = Chr(254)
      Cancel = True
      End If
      End Sub






      microsoft-excel microsoft






      share|improve this question









      New contributor




      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 5 hours ago









      Gary's Student

      14.3k31834




      14.3k31834






      New contributor




      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 6 hours ago









      user1025198user1025198

      1




      1




      New contributor




      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user1025198 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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
          });


          }
          });






          user1025198 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1428387%2fruntime-error-13-on-cell-not-in-range%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          user1025198 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          user1025198 is a new contributor. Be nice, and check out our Code of Conduct.













          user1025198 is a new contributor. Be nice, and check out our Code of Conduct.












          user1025198 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • 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%2fsuperuser.com%2fquestions%2f1428387%2fruntime-error-13-on-cell-not-in-range%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

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...