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

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
add a comment |
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:

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
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 forByou 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
add a comment |
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:

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

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
microsoft-excel worksheet-function
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 forByou 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
add a comment |
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 forByou 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
add a comment |
2 Answers
2
active
oldest
votes
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.

If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:
Use
SUMIFto skip the#N/Avalues:=SUMIF(B3:B8,"<>#N/A")Change the
ChangeKeymodule to skip over#N/Avalues tooFor 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 IfNext cl

add a comment |
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.

If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:
Use
SUMIFto skip the#N/Avalues:=SUMIF(B3:B8,"<>#N/A")Change the
ChangeKeymodule to skip over#N/Avalues tooFor 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 IfNext cl

add a comment |
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.

If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:
Use
SUMIFto skip the#N/Avalues:=SUMIF(B3:B8,"<>#N/A")Change the
ChangeKeymodule to skip over#N/Avalues tooFor 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 IfNext cl

add a comment |
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.

If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:
Use
SUMIFto skip the#N/Avalues:=SUMIF(B3:B8,"<>#N/A")Change the
ChangeKeymodule to skip over#N/Avalues tooFor 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 IfNext cl

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.

If you do change your mind and you need the #N/A in the cells for chart purposes, you can both:
Use
SUMIFto skip the#N/Avalues:=SUMIF(B3:B8,"<>#N/A")Change the
ChangeKeymodule to skip over#N/Avalues tooFor 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 IfNext cl

edited 6 hours ago
answered 7 hours ago
JvdVJvdV
9971 silver badge10 bronze badges
9971 silver badge10 bronze badges
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited 6 hours ago
answered 6 hours ago
Doug DedenDoug Deden
1,4894 silver badges14 bronze badges
1,4894 silver badges14 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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
Byou 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