Excel: How to create (truly) blank cells from formula so that they get skipped in CTRL+arrow?Excel: How to create (truly) blank cells from formula so that they wont show up in a chart?How do I know what version of Office I have?In Excel 2007 does the data from a formula referenced in another cell get used, or the formula itself?Does excel have an arrow key shortcut to skip blank cells?How do I only show formula data for those rows that have input data in Excel?how to sum values in excel until they reach a specified total, then add the cell next in the columnHow to take the next value from custom list in excel with formulaShortcut to jump to last non-empty row in range skipping empty rowsExcel: Using a calculated average from a column in cells in that same columnExcel: using a formula to only sum from above row until next blank cell?

Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?

What is the hottest thing in the universe?

In which case does the Security misconfiguration vulnerability apply to?

"Table of Astronomy's" depiction of the solar system models

How would you translate this? バタコチーズライス

Why does cat'ing a file via ssh result in control characters?

Are those flyers about apartment purchase a scam?

A trip to the library

How can God warn people of the upcoming rapture without disrupting society?

How do I ask for 2-3 days per week remote work in a job interview?

Swap (and hibernation) on SSD in 2019?

Installing Windows to flash UEFI/ BIOS, then reinstalling Ubuntu

Why aren't rainbows blurred-out into nothing after they are produced?

What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?

Weird resistor with dots around it

Why is there a large performance impact when looping over an array over 240 elements?

Luggage Storage at Szechenyi Baths

Global BGP Routing only by only importing supernet prefixes

Would Mirko Vosk, Mind Drinker trigger Waste Not?

Are there any cons in using rounded corners for bar graphs?

How should I write this passage to make it the most readable?

Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?

Running code generated in realtime in JavaScript with eval()

Graphs for which a calculus student can reasonably compute the arclength



Excel: How to create (truly) blank cells from formula so that they get skipped in CTRL+arrow?


Excel: How to create (truly) blank cells from formula so that they wont show up in a chart?How do I know what version of Office I have?In Excel 2007 does the data from a formula referenced in another cell get used, or the formula itself?Does excel have an arrow key shortcut to skip blank cells?How do I only show formula data for those rows that have input data in Excel?how to sum values in excel until they reach a specified total, then add the cell next in the columnHow to take the next value from custom list in excel with formulaShortcut to jump to last non-empty row in range skipping empty rowsExcel: Using a calculated average from a column in cells in that same columnExcel: using a formula to only sum from above row until next blank cell?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















This question asks about how to use a formula to create truly blank cells so that they won't show up in a chart. The solution is to use the formula NA() which makes the cell take on the value #N/A.



As a common use case, I have a column which is basically a flag, containing a formula IF(flag_condition, 1, ""). I then have a SUM() at the top which tells me how many flags are in the column. I would then select an apparently-empty (flag=false) cell near the top of that column and use CTRL+Down trying to jump to the next nonempty cell of that column, to inspect the values in that row, especially when the flags are sparse and the data is long.



However, CTRL+down just goes to the next cell, which appears empty but has the formula.



Using NA() instead of "" (a) makes the cell visibly take on the value #N/A, (b) makes the sum take on the value #N/A, and (c) does not allow CTRL+arrow to skip over that cell.



Therefore, I ask this as a separate question, which is not a duplicate of that.



Is there any solution which overcomes at least issues (c) and possibly (b) of the above?




Per request from @JvdV, here is an example:



enter image description here



The formula in this cell and those below is =IF(MOD(A3,2)=0,1,"").



The intended output is to press CTRL+down and jump to B6, instead of B4.



In this case, the flag is not particularly sparse, but in others, it is.










share|improve this question


























  • Awesome question, i hope there is an answer for this, but i have a feeling only vba will be able to achieve it

    – PeterH
    8 hours ago











  • Please can you include some sample mockup data with expected output. At least for B you could try something like =SUMIF(A1: A10,"<>#N/A").

    – JvdV
    8 hours ago











  • Possible duplicate

    – Stormweaker
    8 hours ago











  • @Stormweaker Nice find but no, the accepted answer there is to actually clear the contents of the cell. If "value" changes, then the contents of the "Even?" column should too.

    – WBT
    7 hours ago


















4















This question asks about how to use a formula to create truly blank cells so that they won't show up in a chart. The solution is to use the formula NA() which makes the cell take on the value #N/A.



As a common use case, I have a column which is basically a flag, containing a formula IF(flag_condition, 1, ""). I then have a SUM() at the top which tells me how many flags are in the column. I would then select an apparently-empty (flag=false) cell near the top of that column and use CTRL+Down trying to jump to the next nonempty cell of that column, to inspect the values in that row, especially when the flags are sparse and the data is long.



However, CTRL+down just goes to the next cell, which appears empty but has the formula.



Using NA() instead of "" (a) makes the cell visibly take on the value #N/A, (b) makes the sum take on the value #N/A, and (c) does not allow CTRL+arrow to skip over that cell.



Therefore, I ask this as a separate question, which is not a duplicate of that.



Is there any solution which overcomes at least issues (c) and possibly (b) of the above?




Per request from @JvdV, here is an example:



enter image description here



The formula in this cell and those below is =IF(MOD(A3,2)=0,1,"").



The intended output is to press CTRL+down and jump to B6, instead of B4.



In this case, the flag is not particularly sparse, but in others, it is.










share|improve this question


























  • Awesome question, i hope there is an answer for this, but i have a feeling only vba will be able to achieve it

    – PeterH
    8 hours ago











  • Please can you include some sample mockup data with expected output. At least for B you could try something like =SUMIF(A1: A10,"<>#N/A").

    – JvdV
    8 hours ago











  • Possible duplicate

    – Stormweaker
    8 hours ago











  • @Stormweaker Nice find but no, the accepted answer there is to actually clear the contents of the cell. If "value" changes, then the contents of the "Even?" column should too.

    – WBT
    7 hours ago














4












4








4


1






This question asks about how to use a formula to create truly blank cells so that they won't show up in a chart. The solution is to use the formula NA() which makes the cell take on the value #N/A.



As a common use case, I have a column which is basically a flag, containing a formula IF(flag_condition, 1, ""). I then have a SUM() at the top which tells me how many flags are in the column. I would then select an apparently-empty (flag=false) cell near the top of that column and use CTRL+Down trying to jump to the next nonempty cell of that column, to inspect the values in that row, especially when the flags are sparse and the data is long.



However, CTRL+down just goes to the next cell, which appears empty but has the formula.



Using NA() instead of "" (a) makes the cell visibly take on the value #N/A, (b) makes the sum take on the value #N/A, and (c) does not allow CTRL+arrow to skip over that cell.



Therefore, I ask this as a separate question, which is not a duplicate of that.



Is there any solution which overcomes at least issues (c) and possibly (b) of the above?




Per request from @JvdV, here is an example:



enter image description here



The formula in this cell and those below is =IF(MOD(A3,2)=0,1,"").



The intended output is to press CTRL+down and jump to B6, instead of B4.



In this case, the flag is not particularly sparse, but in others, it is.










share|improve this question
















This question asks about how to use a formula to create truly blank cells so that they won't show up in a chart. The solution is to use the formula NA() which makes the cell take on the value #N/A.



As a common use case, I have a column which is basically a flag, containing a formula IF(flag_condition, 1, ""). I then have a SUM() at the top which tells me how many flags are in the column. I would then select an apparently-empty (flag=false) cell near the top of that column and use CTRL+Down trying to jump to the next nonempty cell of that column, to inspect the values in that row, especially when the flags are sparse and the data is long.



However, CTRL+down just goes to the next cell, which appears empty but has the formula.



Using NA() instead of "" (a) makes the cell visibly take on the value #N/A, (b) makes the sum take on the value #N/A, and (c) does not allow CTRL+arrow to skip over that cell.



Therefore, I ask this as a separate question, which is not a duplicate of that.



Is there any solution which overcomes at least issues (c) and possibly (b) of the above?




Per request from @JvdV, here is an example:



enter image description here



The formula in this cell and those below is =IF(MOD(A3,2)=0,1,"").



The intended output is to press CTRL+down and jump to B6, instead of B4.



In this case, the flag is not particularly sparse, but in others, it is.







microsoft-excel worksheet-function






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 hours ago







WBT

















asked 8 hours ago









WBTWBT

8232 gold badges17 silver badges35 bronze badges




8232 gold badges17 silver badges35 bronze badges















  • Awesome question, i hope there is an answer for this, but i have a feeling only vba will be able to achieve it

    – PeterH
    8 hours ago











  • Please can you include some sample mockup data with expected output. At least for B you could try something like =SUMIF(A1: A10,"<>#N/A").

    – JvdV
    8 hours ago











  • Possible duplicate

    – Stormweaker
    8 hours ago











  • @Stormweaker Nice find but no, the accepted answer there is to actually clear the contents of the cell. If "value" changes, then the contents of the "Even?" column should too.

    – WBT
    7 hours ago


















  • Awesome question, i hope there is an answer for this, but i have a feeling only vba will be able to achieve it

    – PeterH
    8 hours ago











  • Please can you include some sample mockup data with expected output. At least for B you could try something like =SUMIF(A1: A10,"<>#N/A").

    – JvdV
    8 hours ago











  • Possible duplicate

    – Stormweaker
    8 hours ago











  • @Stormweaker Nice find but no, the accepted answer there is to actually clear the contents of the cell. If "value" changes, then the contents of the "Even?" column should too.

    – WBT
    7 hours ago

















Awesome question, i hope there is an answer for this, but i have a feeling only vba will be able to achieve it

– PeterH
8 hours ago





Awesome question, i hope there is an answer for this, but i have a feeling only vba will be able to achieve it

– PeterH
8 hours ago













Please can you include some sample mockup data with expected output. At least for B you could try something like =SUMIF(A1: A10,"<>#N/A").

– JvdV
8 hours ago





Please can you include some sample mockup data with expected output. At least for B you could try something like =SUMIF(A1: A10,"<>#N/A").

– JvdV
8 hours ago













Possible duplicate

– Stormweaker
8 hours ago





Possible duplicate

– Stormweaker
8 hours ago













@Stormweaker Nice find but no, the accepted answer there is to actually clear the contents of the cell. If "value" changes, then the contents of the "Even?" column should too.

– WBT
7 hours ago






@Stormweaker Nice find but no, the accepted answer there is to actually clear the contents of the cell. If "value" changes, then the contents of the "Even?" column should too.

– WBT
7 hours ago











2 Answers
2






active

oldest

votes


















1














I'm afraid that because the values in B3, B4 etc are not truely empty cells Excel's Ctrl+Down wont skip to the next cell that has another value than "" because simply "" is some kind of value through formula.



I have tried to overcome that using VBA with a module on the Workbook.Open event. As below:



Private Sub Workbook_Open()

Application.OnKey "^DOWN", "ChangeKey"

End Sub


This tells Excel upon opening to upon pressing Ctrl+Down it needs to call a module called ChangeKey. That particular module could look like:



Sub ChangeKey()

With ThisWorkbook.Sheets("Sheet1")
Set rng = .Range(.Cells(ActiveCell.Row, ActiveCell.Column), .Cells(.Range("B" & Rows.Count).End(xlUp).Row, ActiveCell.Column))
For Each cl In rng
If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
Next cl
End With

End Sub


You should still be able to use SUM on the range now without it giving a #N/A error.



enter image description here




If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:




  • Use SUMIF to skip the #N/A values:



    =SUMIF(B3:B8,"<>#N/A")



  • Change the ChangeKey module to skip over #N/A values too



    For Each cl In rng
    If Application.WorksheetFunction.IsNA(cl) = False Then
    If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
    End If


    Next cl



enter image description here






share|improve this answer


































    1














    I've found a way to do this, using VBA and Worksheet_Change. I populated a third column, C, that will contain a 1 for even values in column A, and will be empty for odd values in column A. Whenever a value in column A is changed, this code will fire, updating the corresponding value in C. You can then hide column B and use column C to do your Ctrl+Arrow navigation.



    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range

    ' The variable KeyCells contains the cells that will
    ' cause an alert when they are changed.
    Set KeyCells = Range("A3:A999")

    'Suppress further events to avoid cascading changes.
    Application.EnableEvents = False

    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
    Is Nothing Then

    ' Place your code here.
    If Target.Offset(0, 1).Value = 1 Then
    Target.Offset(0, 2) = 1
    Else
    Target.Offset(0, 2).Clear
    End If

    'Uncomment the next line for troubleshooting.
    'MsgBox "Cell " & Target.Address & " has changed."

    End If
    'Re-enable further events.
    Application.EnableEvents = True
    End Sub


    This is quick-and-dirty code, so you can likely simplify this somewhat. For example, you could put the If … Mod … logic in the VBA code instead of in a formula in column B, and then you won't need the extra column.






    share|improve this answer





























      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
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1471244%2fexcel-how-to-create-truly-blank-cells-from-formula-so-that-they-get-skipped-i%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














      I'm afraid that because the values in B3, B4 etc are not truely empty cells Excel's Ctrl+Down wont skip to the next cell that has another value than "" because simply "" is some kind of value through formula.



      I have tried to overcome that using VBA with a module on the Workbook.Open event. As below:



      Private Sub Workbook_Open()

      Application.OnKey "^DOWN", "ChangeKey"

      End Sub


      This tells Excel upon opening to upon pressing Ctrl+Down it needs to call a module called ChangeKey. That particular module could look like:



      Sub ChangeKey()

      With ThisWorkbook.Sheets("Sheet1")
      Set rng = .Range(.Cells(ActiveCell.Row, ActiveCell.Column), .Cells(.Range("B" & Rows.Count).End(xlUp).Row, ActiveCell.Column))
      For Each cl In rng
      If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
      Next cl
      End With

      End Sub


      You should still be able to use SUM on the range now without it giving a #N/A error.



      enter image description here




      If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:




      • Use SUMIF to skip the #N/A values:



        =SUMIF(B3:B8,"<>#N/A")



      • Change the ChangeKey module to skip over #N/A values too



        For Each cl In rng
        If Application.WorksheetFunction.IsNA(cl) = False Then
        If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
        End If


        Next cl



      enter image description here






      share|improve this answer































        1














        I'm afraid that because the values in B3, B4 etc are not truely empty cells Excel's Ctrl+Down wont skip to the next cell that has another value than "" because simply "" is some kind of value through formula.



        I have tried to overcome that using VBA with a module on the Workbook.Open event. As below:



        Private Sub Workbook_Open()

        Application.OnKey "^DOWN", "ChangeKey"

        End Sub


        This tells Excel upon opening to upon pressing Ctrl+Down it needs to call a module called ChangeKey. That particular module could look like:



        Sub ChangeKey()

        With ThisWorkbook.Sheets("Sheet1")
        Set rng = .Range(.Cells(ActiveCell.Row, ActiveCell.Column), .Cells(.Range("B" & Rows.Count).End(xlUp).Row, ActiveCell.Column))
        For Each cl In rng
        If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
        Next cl
        End With

        End Sub


        You should still be able to use SUM on the range now without it giving a #N/A error.



        enter image description here




        If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:




        • Use SUMIF to skip the #N/A values:



          =SUMIF(B3:B8,"<>#N/A")



        • Change the ChangeKey module to skip over #N/A values too



          For Each cl In rng
          If Application.WorksheetFunction.IsNA(cl) = False Then
          If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
          End If


          Next cl



        enter image description here






        share|improve this answer





























          1












          1








          1







          I'm afraid that because the values in B3, B4 etc are not truely empty cells Excel's Ctrl+Down wont skip to the next cell that has another value than "" because simply "" is some kind of value through formula.



          I have tried to overcome that using VBA with a module on the Workbook.Open event. As below:



          Private Sub Workbook_Open()

          Application.OnKey "^DOWN", "ChangeKey"

          End Sub


          This tells Excel upon opening to upon pressing Ctrl+Down it needs to call a module called ChangeKey. That particular module could look like:



          Sub ChangeKey()

          With ThisWorkbook.Sheets("Sheet1")
          Set rng = .Range(.Cells(ActiveCell.Row, ActiveCell.Column), .Cells(.Range("B" & Rows.Count).End(xlUp).Row, ActiveCell.Column))
          For Each cl In rng
          If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
          Next cl
          End With

          End Sub


          You should still be able to use SUM on the range now without it giving a #N/A error.



          enter image description here




          If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:




          • Use SUMIF to skip the #N/A values:



            =SUMIF(B3:B8,"<>#N/A")



          • Change the ChangeKey module to skip over #N/A values too



            For Each cl In rng
            If Application.WorksheetFunction.IsNA(cl) = False Then
            If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
            End If


            Next cl



          enter image description here






          share|improve this answer















          I'm afraid that because the values in B3, B4 etc are not truely empty cells Excel's Ctrl+Down wont skip to the next cell that has another value than "" because simply "" is some kind of value through formula.



          I have tried to overcome that using VBA with a module on the Workbook.Open event. As below:



          Private Sub Workbook_Open()

          Application.OnKey "^DOWN", "ChangeKey"

          End Sub


          This tells Excel upon opening to upon pressing Ctrl+Down it needs to call a module called ChangeKey. That particular module could look like:



          Sub ChangeKey()

          With ThisWorkbook.Sheets("Sheet1")
          Set rng = .Range(.Cells(ActiveCell.Row, ActiveCell.Column), .Cells(.Range("B" & Rows.Count).End(xlUp).Row, ActiveCell.Column))
          For Each cl In rng
          If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
          Next cl
          End With

          End Sub


          You should still be able to use SUM on the range now without it giving a #N/A error.



          enter image description here




          If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:




          • Use SUMIF to skip the #N/A values:



            =SUMIF(B3:B8,"<>#N/A")



          • Change the ChangeKey module to skip over #N/A values too



            For Each cl In rng
            If Application.WorksheetFunction.IsNA(cl) = False Then
            If Len(cl) <> 0 And cl.Row > ActiveCell.Row Then cl.Select: Exit For
            End If


            Next cl



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 6 hours ago

























          answered 7 hours ago









          JvdVJvdV

          9971 silver badge10 bronze badges




          9971 silver badge10 bronze badges


























              1














              I've found a way to do this, using VBA and Worksheet_Change. I populated a third column, C, that will contain a 1 for even values in column A, and will be empty for odd values in column A. Whenever a value in column A is changed, this code will fire, updating the corresponding value in C. You can then hide column B and use column C to do your Ctrl+Arrow navigation.



              Private Sub Worksheet_Change(ByVal Target As Range)
              Dim KeyCells As Range

              ' The variable KeyCells contains the cells that will
              ' cause an alert when they are changed.
              Set KeyCells = Range("A3:A999")

              'Suppress further events to avoid cascading changes.
              Application.EnableEvents = False

              If Not Application.Intersect(KeyCells, Range(Target.Address)) _
              Is Nothing Then

              ' Place your code here.
              If Target.Offset(0, 1).Value = 1 Then
              Target.Offset(0, 2) = 1
              Else
              Target.Offset(0, 2).Clear
              End If

              'Uncomment the next line for troubleshooting.
              'MsgBox "Cell " & Target.Address & " has changed."

              End If
              'Re-enable further events.
              Application.EnableEvents = True
              End Sub


              This is quick-and-dirty code, so you can likely simplify this somewhat. For example, you could put the If … Mod … logic in the VBA code instead of in a formula in column B, and then you won't need the extra column.






              share|improve this answer































                1














                I've found a way to do this, using VBA and Worksheet_Change. I populated a third column, C, that will contain a 1 for even values in column A, and will be empty for odd values in column A. Whenever a value in column A is changed, this code will fire, updating the corresponding value in C. You can then hide column B and use column C to do your Ctrl+Arrow navigation.



                Private Sub Worksheet_Change(ByVal Target As Range)
                Dim KeyCells As Range

                ' The variable KeyCells contains the cells that will
                ' cause an alert when they are changed.
                Set KeyCells = Range("A3:A999")

                'Suppress further events to avoid cascading changes.
                Application.EnableEvents = False

                If Not Application.Intersect(KeyCells, Range(Target.Address)) _
                Is Nothing Then

                ' Place your code here.
                If Target.Offset(0, 1).Value = 1 Then
                Target.Offset(0, 2) = 1
                Else
                Target.Offset(0, 2).Clear
                End If

                'Uncomment the next line for troubleshooting.
                'MsgBox "Cell " & Target.Address & " has changed."

                End If
                'Re-enable further events.
                Application.EnableEvents = True
                End Sub


                This is quick-and-dirty code, so you can likely simplify this somewhat. For example, you could put the If … Mod … logic in the VBA code instead of in a formula in column B, and then you won't need the extra column.






                share|improve this answer





























                  1












                  1








                  1







                  I've found a way to do this, using VBA and Worksheet_Change. I populated a third column, C, that will contain a 1 for even values in column A, and will be empty for odd values in column A. Whenever a value in column A is changed, this code will fire, updating the corresponding value in C. You can then hide column B and use column C to do your Ctrl+Arrow navigation.



                  Private Sub Worksheet_Change(ByVal Target As Range)
                  Dim KeyCells As Range

                  ' The variable KeyCells contains the cells that will
                  ' cause an alert when they are changed.
                  Set KeyCells = Range("A3:A999")

                  'Suppress further events to avoid cascading changes.
                  Application.EnableEvents = False

                  If Not Application.Intersect(KeyCells, Range(Target.Address)) _
                  Is Nothing Then

                  ' Place your code here.
                  If Target.Offset(0, 1).Value = 1 Then
                  Target.Offset(0, 2) = 1
                  Else
                  Target.Offset(0, 2).Clear
                  End If

                  'Uncomment the next line for troubleshooting.
                  'MsgBox "Cell " & Target.Address & " has changed."

                  End If
                  'Re-enable further events.
                  Application.EnableEvents = True
                  End Sub


                  This is quick-and-dirty code, so you can likely simplify this somewhat. For example, you could put the If … Mod … logic in the VBA code instead of in a formula in column B, and then you won't need the extra column.






                  share|improve this answer















                  I've found a way to do this, using VBA and Worksheet_Change. I populated a third column, C, that will contain a 1 for even values in column A, and will be empty for odd values in column A. Whenever a value in column A is changed, this code will fire, updating the corresponding value in C. You can then hide column B and use column C to do your Ctrl+Arrow navigation.



                  Private Sub Worksheet_Change(ByVal Target As Range)
                  Dim KeyCells As Range

                  ' The variable KeyCells contains the cells that will
                  ' cause an alert when they are changed.
                  Set KeyCells = Range("A3:A999")

                  'Suppress further events to avoid cascading changes.
                  Application.EnableEvents = False

                  If Not Application.Intersect(KeyCells, Range(Target.Address)) _
                  Is Nothing Then

                  ' Place your code here.
                  If Target.Offset(0, 1).Value = 1 Then
                  Target.Offset(0, 2) = 1
                  Else
                  Target.Offset(0, 2).Clear
                  End If

                  'Uncomment the next line for troubleshooting.
                  'MsgBox "Cell " & Target.Address & " has changed."

                  End If
                  'Re-enable further events.
                  Application.EnableEvents = True
                  End Sub


                  This is quick-and-dirty code, so you can likely simplify this somewhat. For example, you could put the If … Mod … logic in the VBA code instead of in a formula in column B, and then you won't need the extra column.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 6 hours ago

























                  answered 6 hours ago









                  Doug DedenDoug Deden

                  1,4894 silver badges14 bronze badges




                  1,4894 silver badges14 bronze badges






























                      draft saved

                      draft discarded
















































                      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%2f1471244%2fexcel-how-to-create-truly-blank-cells-from-formula-so-that-they-get-skipped-i%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

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480