My For loop won't delete the cells that match the nested If requirements












0















I finally got this to work and I am happier for it but I need to take it to the next level for chart building. As you can see it progresses through the columns and rows and clears a pair of cells. When I try to make a chart of the full row it comes up with gaps in it because of the cleared cells. There is a "with" statement going on here but its just a reference to another sheet since the code is being executed from a different sheet; pushing as opposed to pulling.



LCcfd = .Standard Last Column code. The cfd referst to the abv. of a sheet.
Lrcfd = .Standard Last Row code. The cfd refers to the abv. of a sheet.

For x = 2 to LRcfd Step 2
CF = 2
For Each cel in .Range(.Cells(x, 2), .Cells(x, LCcfd))
If cel = 0 Or cel = "0" Then
cel.Clear
.Cells(x - 1, CF).Clear
End If
CF = CF + 1
Next
Next


To take it to the next level I tried to change the .Clear to .Delete Shift:=xlShiftToLeft and it is NOT working as expected at all. I figured this was because it is progressing in the columns from left to right. I attempted to write the code so it goes through Each backwards but it will not accept a Step -1. So, I don't know how to do that.



What can I do to this code to make it step backwards through the rows? Or:



What can you recommend I change the code to, to make this happen?










share|improve this question




















  • 1





    where is "x" utilized?

    – Cyril
    Jan 2 at 19:44






  • 1





    Where's your With statement? Also, you don't need the Else statement. Just end the If statement after .Clear, then do the CF = CF + 1

    – BruceWayne
    Jan 2 at 19:45













  • Thank you for pointing out the "x"; fixed that. The PC was supposed to be replaced by the "x." Thank you @BruceWayne for clearing the useless Else statement. When a problem causes me a lot of grief I seem to do worse coding.

    – Don of the Dead
    Jan 4 at 14:47











  • Seems like you ignored Cyril's comment bellow. Please see stackoverflow.com/help/someone-answers

    – Slai
    Jan 5 at 8:40
















0















I finally got this to work and I am happier for it but I need to take it to the next level for chart building. As you can see it progresses through the columns and rows and clears a pair of cells. When I try to make a chart of the full row it comes up with gaps in it because of the cleared cells. There is a "with" statement going on here but its just a reference to another sheet since the code is being executed from a different sheet; pushing as opposed to pulling.



LCcfd = .Standard Last Column code. The cfd referst to the abv. of a sheet.
Lrcfd = .Standard Last Row code. The cfd refers to the abv. of a sheet.

For x = 2 to LRcfd Step 2
CF = 2
For Each cel in .Range(.Cells(x, 2), .Cells(x, LCcfd))
If cel = 0 Or cel = "0" Then
cel.Clear
.Cells(x - 1, CF).Clear
End If
CF = CF + 1
Next
Next


To take it to the next level I tried to change the .Clear to .Delete Shift:=xlShiftToLeft and it is NOT working as expected at all. I figured this was because it is progressing in the columns from left to right. I attempted to write the code so it goes through Each backwards but it will not accept a Step -1. So, I don't know how to do that.



What can I do to this code to make it step backwards through the rows? Or:



What can you recommend I change the code to, to make this happen?










share|improve this question




















  • 1





    where is "x" utilized?

    – Cyril
    Jan 2 at 19:44






  • 1





    Where's your With statement? Also, you don't need the Else statement. Just end the If statement after .Clear, then do the CF = CF + 1

    – BruceWayne
    Jan 2 at 19:45













  • Thank you for pointing out the "x"; fixed that. The PC was supposed to be replaced by the "x." Thank you @BruceWayne for clearing the useless Else statement. When a problem causes me a lot of grief I seem to do worse coding.

    – Don of the Dead
    Jan 4 at 14:47











  • Seems like you ignored Cyril's comment bellow. Please see stackoverflow.com/help/someone-answers

    – Slai
    Jan 5 at 8:40














0












0








0








I finally got this to work and I am happier for it but I need to take it to the next level for chart building. As you can see it progresses through the columns and rows and clears a pair of cells. When I try to make a chart of the full row it comes up with gaps in it because of the cleared cells. There is a "with" statement going on here but its just a reference to another sheet since the code is being executed from a different sheet; pushing as opposed to pulling.



LCcfd = .Standard Last Column code. The cfd referst to the abv. of a sheet.
Lrcfd = .Standard Last Row code. The cfd refers to the abv. of a sheet.

For x = 2 to LRcfd Step 2
CF = 2
For Each cel in .Range(.Cells(x, 2), .Cells(x, LCcfd))
If cel = 0 Or cel = "0" Then
cel.Clear
.Cells(x - 1, CF).Clear
End If
CF = CF + 1
Next
Next


To take it to the next level I tried to change the .Clear to .Delete Shift:=xlShiftToLeft and it is NOT working as expected at all. I figured this was because it is progressing in the columns from left to right. I attempted to write the code so it goes through Each backwards but it will not accept a Step -1. So, I don't know how to do that.



What can I do to this code to make it step backwards through the rows? Or:



What can you recommend I change the code to, to make this happen?










share|improve this question
















I finally got this to work and I am happier for it but I need to take it to the next level for chart building. As you can see it progresses through the columns and rows and clears a pair of cells. When I try to make a chart of the full row it comes up with gaps in it because of the cleared cells. There is a "with" statement going on here but its just a reference to another sheet since the code is being executed from a different sheet; pushing as opposed to pulling.



LCcfd = .Standard Last Column code. The cfd referst to the abv. of a sheet.
Lrcfd = .Standard Last Row code. The cfd refers to the abv. of a sheet.

For x = 2 to LRcfd Step 2
CF = 2
For Each cel in .Range(.Cells(x, 2), .Cells(x, LCcfd))
If cel = 0 Or cel = "0" Then
cel.Clear
.Cells(x - 1, CF).Clear
End If
CF = CF + 1
Next
Next


To take it to the next level I tried to change the .Clear to .Delete Shift:=xlShiftToLeft and it is NOT working as expected at all. I figured this was because it is progressing in the columns from left to right. I attempted to write the code so it goes through Each backwards but it will not accept a Step -1. So, I don't know how to do that.



What can I do to this code to make it step backwards through the rows? Or:



What can you recommend I change the code to, to make this happen?







excel vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 14:47







Don of the Dead

















asked Jan 2 at 19:33









Don of the DeadDon of the Dead

112




112








  • 1





    where is "x" utilized?

    – Cyril
    Jan 2 at 19:44






  • 1





    Where's your With statement? Also, you don't need the Else statement. Just end the If statement after .Clear, then do the CF = CF + 1

    – BruceWayne
    Jan 2 at 19:45













  • Thank you for pointing out the "x"; fixed that. The PC was supposed to be replaced by the "x." Thank you @BruceWayne for clearing the useless Else statement. When a problem causes me a lot of grief I seem to do worse coding.

    – Don of the Dead
    Jan 4 at 14:47











  • Seems like you ignored Cyril's comment bellow. Please see stackoverflow.com/help/someone-answers

    – Slai
    Jan 5 at 8:40














  • 1





    where is "x" utilized?

    – Cyril
    Jan 2 at 19:44






  • 1





    Where's your With statement? Also, you don't need the Else statement. Just end the If statement after .Clear, then do the CF = CF + 1

    – BruceWayne
    Jan 2 at 19:45













  • Thank you for pointing out the "x"; fixed that. The PC was supposed to be replaced by the "x." Thank you @BruceWayne for clearing the useless Else statement. When a problem causes me a lot of grief I seem to do worse coding.

    – Don of the Dead
    Jan 4 at 14:47











  • Seems like you ignored Cyril's comment bellow. Please see stackoverflow.com/help/someone-answers

    – Slai
    Jan 5 at 8:40








1




1





where is "x" utilized?

– Cyril
Jan 2 at 19:44





where is "x" utilized?

– Cyril
Jan 2 at 19:44




1




1





Where's your With statement? Also, you don't need the Else statement. Just end the If statement after .Clear, then do the CF = CF + 1

– BruceWayne
Jan 2 at 19:45







Where's your With statement? Also, you don't need the Else statement. Just end the If statement after .Clear, then do the CF = CF + 1

– BruceWayne
Jan 2 at 19:45















Thank you for pointing out the "x"; fixed that. The PC was supposed to be replaced by the "x." Thank you @BruceWayne for clearing the useless Else statement. When a problem causes me a lot of grief I seem to do worse coding.

– Don of the Dead
Jan 4 at 14:47





Thank you for pointing out the "x"; fixed that. The PC was supposed to be replaced by the "x." Thank you @BruceWayne for clearing the useless Else statement. When a problem causes me a lot of grief I seem to do worse coding.

– Don of the Dead
Jan 4 at 14:47













Seems like you ignored Cyril's comment bellow. Please see stackoverflow.com/help/someone-answers

– Slai
Jan 5 at 8:40





Seems like you ignored Cyril's comment bellow. Please see stackoverflow.com/help/someone-answers

– Slai
Jan 5 at 8:40












2 Answers
2






active

oldest

votes


















0














Will try to give an example, though I don't know your exact criteria for your range (variables which aren't displayed in your posted code)



dim r as long, c as long 
for r = 10 to 1 step -1
for c = 10 to 1 step -1
if cells(r,c).value = 0 or cells(r,c).value = "0" then cells(r,c).delete shift:=xltoleft
next c
next r





share|improve this answer
























  • Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

    – Don of the Dead
    Jan 4 at 14:50











  • Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

    – Don of the Dead
    Jan 4 at 14:51











  • I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

    – Cyril
    Jan 4 at 15:19





















0














Another approach is to write the evaluated content of the datasource to another worksheet (or Range) dedicated to serving your chart. This avoids the cell delete/shift manipulations and keeps yours source data intact - probably making debugging easier.



Sub GenerateChartDataFromSource()
Dim sourceWksht As Worksheet
Set sourceWksht = Application.Worksheets("Source")

Dim chartWksht As Worksheet
Set chartWksht = Application.Worksheets("ChartSource")


Dim sourceRow As Long, sourceColumn As Long
Dim chartSourceColumn As Long

Dim sourceContent As Variant

Dim sourceRowStart As Long, sourceRowEnd As Long
sourceRowStart = 1
sourceRowEnd = 10

Dim sourceColumnStart As Long, sourceColumnEnd As Long
sourceColumnStart = 1
sourceColumnEnd = 10

For sourceRow = sourceRowStart To sourceRowEnd
chartSourceColumn = sourceColumnStart
For sourceColumn = sourceColumnStart To sourceColumnEnd
sourceContent = sourceWksht.Cells(sourceRow, sourceColumn).value
If sourceContent <> 0 Or sourceContent <> "0" Then
chartWksht.Cells(sourceRow, chartSourceColumn) = sourceContent
chartSourceColumn = chartSourceColumn + 1
End If
Next sourceColumn
Next sourceRow
End Sub





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%2f54012157%2fmy-for-loop-wont-delete-the-cells-that-match-the-nested-if-requirements%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









    0














    Will try to give an example, though I don't know your exact criteria for your range (variables which aren't displayed in your posted code)



    dim r as long, c as long 
    for r = 10 to 1 step -1
    for c = 10 to 1 step -1
    if cells(r,c).value = 0 or cells(r,c).value = "0" then cells(r,c).delete shift:=xltoleft
    next c
    next r





    share|improve this answer
























    • Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

      – Don of the Dead
      Jan 4 at 14:50











    • Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

      – Don of the Dead
      Jan 4 at 14:51











    • I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

      – Cyril
      Jan 4 at 15:19


















    0














    Will try to give an example, though I don't know your exact criteria for your range (variables which aren't displayed in your posted code)



    dim r as long, c as long 
    for r = 10 to 1 step -1
    for c = 10 to 1 step -1
    if cells(r,c).value = 0 or cells(r,c).value = "0" then cells(r,c).delete shift:=xltoleft
    next c
    next r





    share|improve this answer
























    • Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

      – Don of the Dead
      Jan 4 at 14:50











    • Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

      – Don of the Dead
      Jan 4 at 14:51











    • I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

      – Cyril
      Jan 4 at 15:19
















    0












    0








    0







    Will try to give an example, though I don't know your exact criteria for your range (variables which aren't displayed in your posted code)



    dim r as long, c as long 
    for r = 10 to 1 step -1
    for c = 10 to 1 step -1
    if cells(r,c).value = 0 or cells(r,c).value = "0" then cells(r,c).delete shift:=xltoleft
    next c
    next r





    share|improve this answer













    Will try to give an example, though I don't know your exact criteria for your range (variables which aren't displayed in your posted code)



    dim r as long, c as long 
    for r = 10 to 1 step -1
    for c = 10 to 1 step -1
    if cells(r,c).value = 0 or cells(r,c).value = "0" then cells(r,c).delete shift:=xltoleft
    next c
    next r






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 2 at 19:48









    CyrilCyril

    2,9491924




    2,9491924













    • Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

      – Don of the Dead
      Jan 4 at 14:50











    • Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

      – Don of the Dead
      Jan 4 at 14:51











    • I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

      – Cyril
      Jan 4 at 15:19





















    • Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

      – Don of the Dead
      Jan 4 at 14:50











    • Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

      – Don of the Dead
      Jan 4 at 14:51











    • I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

      – Cyril
      Jan 4 at 15:19



















    Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

    – Don of the Dead
    Jan 4 at 14:50





    Thanks @Cyril. I like the way you contstructed the nested For and use of "r" and "c" for variables; mine were confusing me sometimes and this made it so much simplier. I did have to modify it slightly but going off of what you had you gave me the right answer. All I really needed was the "shift:=xlToLeft" and it worked perfectly.

    – Don of the Dead
    Jan 4 at 14:50













    Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

    – Don of the Dead
    Jan 4 at 14:51





    Speaking of which. What is the difference, if any, between: Shift:=xlShiftToLeft and Shift:=xlToLeft? I appear to have gotten very different answers.

    – Don of the Dead
    Jan 4 at 14:51













    I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

    – Cyril
    Jan 4 at 15:19







    I do not know about the difference between those; i have never used xlshifttoleft when i've coded in VBA for Excel. if that answers your question, please mark as answered (check mark on the left of the post).

    – Cyril
    Jan 4 at 15:19















    0














    Another approach is to write the evaluated content of the datasource to another worksheet (or Range) dedicated to serving your chart. This avoids the cell delete/shift manipulations and keeps yours source data intact - probably making debugging easier.



    Sub GenerateChartDataFromSource()
    Dim sourceWksht As Worksheet
    Set sourceWksht = Application.Worksheets("Source")

    Dim chartWksht As Worksheet
    Set chartWksht = Application.Worksheets("ChartSource")


    Dim sourceRow As Long, sourceColumn As Long
    Dim chartSourceColumn As Long

    Dim sourceContent As Variant

    Dim sourceRowStart As Long, sourceRowEnd As Long
    sourceRowStart = 1
    sourceRowEnd = 10

    Dim sourceColumnStart As Long, sourceColumnEnd As Long
    sourceColumnStart = 1
    sourceColumnEnd = 10

    For sourceRow = sourceRowStart To sourceRowEnd
    chartSourceColumn = sourceColumnStart
    For sourceColumn = sourceColumnStart To sourceColumnEnd
    sourceContent = sourceWksht.Cells(sourceRow, sourceColumn).value
    If sourceContent <> 0 Or sourceContent <> "0" Then
    chartWksht.Cells(sourceRow, chartSourceColumn) = sourceContent
    chartSourceColumn = chartSourceColumn + 1
    End If
    Next sourceColumn
    Next sourceRow
    End Sub





    share|improve this answer






























      0














      Another approach is to write the evaluated content of the datasource to another worksheet (or Range) dedicated to serving your chart. This avoids the cell delete/shift manipulations and keeps yours source data intact - probably making debugging easier.



      Sub GenerateChartDataFromSource()
      Dim sourceWksht As Worksheet
      Set sourceWksht = Application.Worksheets("Source")

      Dim chartWksht As Worksheet
      Set chartWksht = Application.Worksheets("ChartSource")


      Dim sourceRow As Long, sourceColumn As Long
      Dim chartSourceColumn As Long

      Dim sourceContent As Variant

      Dim sourceRowStart As Long, sourceRowEnd As Long
      sourceRowStart = 1
      sourceRowEnd = 10

      Dim sourceColumnStart As Long, sourceColumnEnd As Long
      sourceColumnStart = 1
      sourceColumnEnd = 10

      For sourceRow = sourceRowStart To sourceRowEnd
      chartSourceColumn = sourceColumnStart
      For sourceColumn = sourceColumnStart To sourceColumnEnd
      sourceContent = sourceWksht.Cells(sourceRow, sourceColumn).value
      If sourceContent <> 0 Or sourceContent <> "0" Then
      chartWksht.Cells(sourceRow, chartSourceColumn) = sourceContent
      chartSourceColumn = chartSourceColumn + 1
      End If
      Next sourceColumn
      Next sourceRow
      End Sub





      share|improve this answer




























        0












        0








        0







        Another approach is to write the evaluated content of the datasource to another worksheet (or Range) dedicated to serving your chart. This avoids the cell delete/shift manipulations and keeps yours source data intact - probably making debugging easier.



        Sub GenerateChartDataFromSource()
        Dim sourceWksht As Worksheet
        Set sourceWksht = Application.Worksheets("Source")

        Dim chartWksht As Worksheet
        Set chartWksht = Application.Worksheets("ChartSource")


        Dim sourceRow As Long, sourceColumn As Long
        Dim chartSourceColumn As Long

        Dim sourceContent As Variant

        Dim sourceRowStart As Long, sourceRowEnd As Long
        sourceRowStart = 1
        sourceRowEnd = 10

        Dim sourceColumnStart As Long, sourceColumnEnd As Long
        sourceColumnStart = 1
        sourceColumnEnd = 10

        For sourceRow = sourceRowStart To sourceRowEnd
        chartSourceColumn = sourceColumnStart
        For sourceColumn = sourceColumnStart To sourceColumnEnd
        sourceContent = sourceWksht.Cells(sourceRow, sourceColumn).value
        If sourceContent <> 0 Or sourceContent <> "0" Then
        chartWksht.Cells(sourceRow, chartSourceColumn) = sourceContent
        chartSourceColumn = chartSourceColumn + 1
        End If
        Next sourceColumn
        Next sourceRow
        End Sub





        share|improve this answer















        Another approach is to write the evaluated content of the datasource to another worksheet (or Range) dedicated to serving your chart. This avoids the cell delete/shift manipulations and keeps yours source data intact - probably making debugging easier.



        Sub GenerateChartDataFromSource()
        Dim sourceWksht As Worksheet
        Set sourceWksht = Application.Worksheets("Source")

        Dim chartWksht As Worksheet
        Set chartWksht = Application.Worksheets("ChartSource")


        Dim sourceRow As Long, sourceColumn As Long
        Dim chartSourceColumn As Long

        Dim sourceContent As Variant

        Dim sourceRowStart As Long, sourceRowEnd As Long
        sourceRowStart = 1
        sourceRowEnd = 10

        Dim sourceColumnStart As Long, sourceColumnEnd As Long
        sourceColumnStart = 1
        sourceColumnEnd = 10

        For sourceRow = sourceRowStart To sourceRowEnd
        chartSourceColumn = sourceColumnStart
        For sourceColumn = sourceColumnStart To sourceColumnEnd
        sourceContent = sourceWksht.Cells(sourceRow, sourceColumn).value
        If sourceContent <> 0 Or sourceContent <> "0" Then
        chartWksht.Cells(sourceRow, chartSourceColumn) = sourceContent
        chartSourceColumn = chartSourceColumn + 1
        End If
        Next sourceColumn
        Next sourceRow
        End Sub






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 4 at 22:47

























        answered Jan 4 at 16:33









        BZngrBZngr

        1513




        1513






























            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%2f54012157%2fmy-for-loop-wont-delete-the-cells-that-match-the-nested-if-requirements%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

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

            A Topological Invariant for $pi_3(U(n))$