Loop through two validation lists + copy and paste output

  • so I was able to remodify the code and get column A and B of the output sheet. The actual outputs (in column C and D) weren't recorded for me, though.


    Do you know why what could cause that by any chance? I didn't make any changes to anything below ' Last Step is to actually Loop in order to produce and display Results aside from change the sheet number.

  • Glad to hear at least some progress was made ... :)


    Obviously ... difficult for me to guess what are the actual changes you have made to adapt the code to your real life worksheet...


    Among the assumptions :

    1. Where are exactly located your specific formulas ?

    2. Do they recalculate properly ?

    ( for example, at the very end of the macro, can you check the values displayed in the four cells :A1,A2, B1 and B2 )

    3. Are you experiencing a very long delay when you run the macro ?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Not sure if this has anything to do with it but in my actual file B1 and B2 are actually D19 and E19. I wasn't able to find the portion of the code to make this adjustment.


    Do not look any further ... you found the adjustment which is required ...


    Could you just confirm the exact location of each cell compared to what was shown in your test file :


    Cell A1 - New Location is Cell : .......

    Cell A2 - New Location is Cell : .......

    Cell B1 - New Location is Cell : .......

    Cell B2 - New Location is Cell : .......

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Me too. Big thanks to you <3


    1. Formulas are being calculated in M26:Q38

    2. Yup, they do calculate properly showing results in D19 and E19 (our B1 and B2 - I changed this in the code already). There're actually more results in D18:E20 but for now let's keep it simple and focus on D19 and E19.

    3. No, delay. It takes about a minute or so to run through the calculation


    A1 = D13, A2 = D14 (I changed this already in the code as well).

  • Ok ...

    If you have already adjusted both cells D13 and D14 as the cells with the Data Validation Lists ...


    You are left with the final section which deals only with the display ...

    see code below :

    Code
    ' Read The Results ...
                    ' and Display Combined Results in Output Sheet
                    With Sheet2
                        .Cells(last, 1).Value = rng1.Value
                        .Cells(last, 2).Value = rng2.Value
                        .Cells(last, 3).Value = rng1.Offset(6, 0).Value
                        .Cells(last, 4).Value = rng2.Offset(5, 1).Value
                    End With


    Hope this clarifies

    :)

  • Scream! This works. You're awesome. I'm crying.


    May I ask for one additional thing? If I also want to bring in additional results say also from D18 and E18 to our sheet2? What would I have to add? I'm not sure how offset works.

  • Very pleased to hear you have managed to build your own solution :):):)


    Well Done ...:thumbup::thumbup::thumbup:


    Regarding your cells D18 and E18 ... they do contain very probably formulas which do also get recalculated with the modifications of your Input cells D13 and D14 ...


    If that is the case ... a tiny modification would be :



    You will pretty soon become a Top EXPERT ... !!!!8)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • This is awesome. This is probably one of the best days I've had in a while.


    haha I'm far from that. Credits all go to you. Thank you again for everything :)

    Great News ... !!!:)


    Thanks a lot for your Thanks :thumbup:


    Wish you all the Best :!:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!