Excel Dynamic List with no blanks









up vote
1
down vote

favorite












I have a list of products (1-10) for example and an Invoice for a customer.
I want to show which products are being bought on the invoice, based on a formula.
The only problem is that the customer might not buy all products. So for example they could buy product 1,5,6, I want to show 1 on the first row, 5 on the second and 6 on the third (no blanks in between).



This is what I want



This is what I'm getting



I have been fiddling with Index and Match as per this post, but I still get blank rows coming through. I know that I can loop through the invoice and delete blank rows, but I'd prefer not to do this (reusability issues).



I believe that Helper columns can work here. I have been using Helper columns for a long time (without realising that there was a term for them :) )
I often concatenate cells to do vlookups etc.



How would a helper column help here? What would I do? How would I do it?



Below is the list of products:



Products



And below is the list of products that the client wants (blank rows are products that they didn't order (products 2 - 4,7-10):
Ordered Products










share|improve this question























  • would you open to using VBA?
    – Kubie
    Nov 10 at 3:13










  • What does your starting data look like? That will in part determine your options. And please share your current formula attempt.
    – QHarr
    Nov 10 at 3:24











  • Open to VBA definitely, just not deleting rows :)
    – Craig Archer
    Nov 10 at 3:34










  • Formula: =IFERROR(INDEX('Jan Calcs'!D$22:D$31,MATCH(ROW()-ROW($D$4),$A$5:$A$14,0)),"") Jan Calcs D22:D31 contains 1,"","","","",5,6 A5:A14 contains:1,2,3,4,5,6,7,8,9,10
    – Craig Archer
    Nov 10 at 3:35







  • 1




    It's not that clear from your screenshots how your data is arranged or where your formulas are...
    – Tim Williams
    Nov 10 at 6:45














up vote
1
down vote

favorite












I have a list of products (1-10) for example and an Invoice for a customer.
I want to show which products are being bought on the invoice, based on a formula.
The only problem is that the customer might not buy all products. So for example they could buy product 1,5,6, I want to show 1 on the first row, 5 on the second and 6 on the third (no blanks in between).



This is what I want



This is what I'm getting



I have been fiddling with Index and Match as per this post, but I still get blank rows coming through. I know that I can loop through the invoice and delete blank rows, but I'd prefer not to do this (reusability issues).



I believe that Helper columns can work here. I have been using Helper columns for a long time (without realising that there was a term for them :) )
I often concatenate cells to do vlookups etc.



How would a helper column help here? What would I do? How would I do it?



Below is the list of products:



Products



And below is the list of products that the client wants (blank rows are products that they didn't order (products 2 - 4,7-10):
Ordered Products










share|improve this question























  • would you open to using VBA?
    – Kubie
    Nov 10 at 3:13










  • What does your starting data look like? That will in part determine your options. And please share your current formula attempt.
    – QHarr
    Nov 10 at 3:24











  • Open to VBA definitely, just not deleting rows :)
    – Craig Archer
    Nov 10 at 3:34










  • Formula: =IFERROR(INDEX('Jan Calcs'!D$22:D$31,MATCH(ROW()-ROW($D$4),$A$5:$A$14,0)),"") Jan Calcs D22:D31 contains 1,"","","","",5,6 A5:A14 contains:1,2,3,4,5,6,7,8,9,10
    – Craig Archer
    Nov 10 at 3:35







  • 1




    It's not that clear from your screenshots how your data is arranged or where your formulas are...
    – Tim Williams
    Nov 10 at 6:45












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a list of products (1-10) for example and an Invoice for a customer.
I want to show which products are being bought on the invoice, based on a formula.
The only problem is that the customer might not buy all products. So for example they could buy product 1,5,6, I want to show 1 on the first row, 5 on the second and 6 on the third (no blanks in between).



This is what I want



This is what I'm getting



I have been fiddling with Index and Match as per this post, but I still get blank rows coming through. I know that I can loop through the invoice and delete blank rows, but I'd prefer not to do this (reusability issues).



I believe that Helper columns can work here. I have been using Helper columns for a long time (without realising that there was a term for them :) )
I often concatenate cells to do vlookups etc.



How would a helper column help here? What would I do? How would I do it?



Below is the list of products:



Products



And below is the list of products that the client wants (blank rows are products that they didn't order (products 2 - 4,7-10):
Ordered Products










share|improve this question















I have a list of products (1-10) for example and an Invoice for a customer.
I want to show which products are being bought on the invoice, based on a formula.
The only problem is that the customer might not buy all products. So for example they could buy product 1,5,6, I want to show 1 on the first row, 5 on the second and 6 on the third (no blanks in between).



This is what I want



This is what I'm getting



I have been fiddling with Index and Match as per this post, but I still get blank rows coming through. I know that I can loop through the invoice and delete blank rows, but I'd prefer not to do this (reusability issues).



I believe that Helper columns can work here. I have been using Helper columns for a long time (without realising that there was a term for them :) )
I often concatenate cells to do vlookups etc.



How would a helper column help here? What would I do? How would I do it?



Below is the list of products:



Products



And below is the list of products that the client wants (blank rows are products that they didn't order (products 2 - 4,7-10):
Ordered Products







excel list dynamic






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 18:33

























asked Nov 10 at 3:09









Craig Archer

64




64











  • would you open to using VBA?
    – Kubie
    Nov 10 at 3:13










  • What does your starting data look like? That will in part determine your options. And please share your current formula attempt.
    – QHarr
    Nov 10 at 3:24











  • Open to VBA definitely, just not deleting rows :)
    – Craig Archer
    Nov 10 at 3:34










  • Formula: =IFERROR(INDEX('Jan Calcs'!D$22:D$31,MATCH(ROW()-ROW($D$4),$A$5:$A$14,0)),"") Jan Calcs D22:D31 contains 1,"","","","",5,6 A5:A14 contains:1,2,3,4,5,6,7,8,9,10
    – Craig Archer
    Nov 10 at 3:35







  • 1




    It's not that clear from your screenshots how your data is arranged or where your formulas are...
    – Tim Williams
    Nov 10 at 6:45
















  • would you open to using VBA?
    – Kubie
    Nov 10 at 3:13










  • What does your starting data look like? That will in part determine your options. And please share your current formula attempt.
    – QHarr
    Nov 10 at 3:24











  • Open to VBA definitely, just not deleting rows :)
    – Craig Archer
    Nov 10 at 3:34










  • Formula: =IFERROR(INDEX('Jan Calcs'!D$22:D$31,MATCH(ROW()-ROW($D$4),$A$5:$A$14,0)),"") Jan Calcs D22:D31 contains 1,"","","","",5,6 A5:A14 contains:1,2,3,4,5,6,7,8,9,10
    – Craig Archer
    Nov 10 at 3:35







  • 1




    It's not that clear from your screenshots how your data is arranged or where your formulas are...
    – Tim Williams
    Nov 10 at 6:45















would you open to using VBA?
– Kubie
Nov 10 at 3:13




would you open to using VBA?
– Kubie
Nov 10 at 3:13












What does your starting data look like? That will in part determine your options. And please share your current formula attempt.
– QHarr
Nov 10 at 3:24





What does your starting data look like? That will in part determine your options. And please share your current formula attempt.
– QHarr
Nov 10 at 3:24













Open to VBA definitely, just not deleting rows :)
– Craig Archer
Nov 10 at 3:34




Open to VBA definitely, just not deleting rows :)
– Craig Archer
Nov 10 at 3:34












Formula: =IFERROR(INDEX('Jan Calcs'!D$22:D$31,MATCH(ROW()-ROW($D$4),$A$5:$A$14,0)),"") Jan Calcs D22:D31 contains 1,"","","","",5,6 A5:A14 contains:1,2,3,4,5,6,7,8,9,10
– Craig Archer
Nov 10 at 3:35





Formula: =IFERROR(INDEX('Jan Calcs'!D$22:D$31,MATCH(ROW()-ROW($D$4),$A$5:$A$14,0)),"") Jan Calcs D22:D31 contains 1,"","","","",5,6 A5:A14 contains:1,2,3,4,5,6,7,8,9,10
– Craig Archer
Nov 10 at 3:35





1




1




It's not that clear from your screenshots how your data is arranged or where your formulas are...
– Tim Williams
Nov 10 at 6:45




It's not that clear from your screenshots how your data is arranged or where your formulas are...
– Tim Williams
Nov 10 at 6:45












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Okay, so not exactly the solution, but it worked:
I basically listed all the values (blanks and all), and before printing, I checked if that cell was blank and if blank it hides the row.



For x = 1 To 300
If Cells(x, 1) = "1" Then
For z = x To x + 29
If Cells(z, 2).Value = "" Then Rows(z).EntireRow.Hidden = True
Next
End If
Next


Thanks for all the interest :)






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',
    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%2f53235700%2fexcel-dynamic-list-with-no-blanks%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Okay, so not exactly the solution, but it worked:
    I basically listed all the values (blanks and all), and before printing, I checked if that cell was blank and if blank it hides the row.



    For x = 1 To 300
    If Cells(x, 1) = "1" Then
    For z = x To x + 29
    If Cells(z, 2).Value = "" Then Rows(z).EntireRow.Hidden = True
    Next
    End If
    Next


    Thanks for all the interest :)






    share|improve this answer
























      up vote
      0
      down vote













      Okay, so not exactly the solution, but it worked:
      I basically listed all the values (blanks and all), and before printing, I checked if that cell was blank and if blank it hides the row.



      For x = 1 To 300
      If Cells(x, 1) = "1" Then
      For z = x To x + 29
      If Cells(z, 2).Value = "" Then Rows(z).EntireRow.Hidden = True
      Next
      End If
      Next


      Thanks for all the interest :)






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Okay, so not exactly the solution, but it worked:
        I basically listed all the values (blanks and all), and before printing, I checked if that cell was blank and if blank it hides the row.



        For x = 1 To 300
        If Cells(x, 1) = "1" Then
        For z = x To x + 29
        If Cells(z, 2).Value = "" Then Rows(z).EntireRow.Hidden = True
        Next
        End If
        Next


        Thanks for all the interest :)






        share|improve this answer












        Okay, so not exactly the solution, but it worked:
        I basically listed all the values (blanks and all), and before printing, I checked if that cell was blank and if blank it hides the row.



        For x = 1 To 300
        If Cells(x, 1) = "1" Then
        For z = x To x + 29
        If Cells(z, 2).Value = "" Then Rows(z).EntireRow.Hidden = True
        Next
        End If
        Next


        Thanks for all the interest :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 at 13:34









        Craig Archer

        64




        64



























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f53235700%2fexcel-dynamic-list-with-no-blanks%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

            Darth Vader #20

            How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

            Ondo