auto populate 1 row, not 2 based on a lookup

  • How would you guys suggest handling this.
    When this code was written all the aircraft we were using had 2 engines and now we have aircraft that are single engines as well but the code auto inputs 2 rows 1 for each engine position even though that particular aircraft only has 1 engine.


    Unfortunately i inherited this excel document and my VBA skills are far less then the person before me.
    the code has made life pretty simple and if I just have to keep deleting the 2nd row then I guess I can live with that but I imagine theres a easy solution, at least I hope.


    I was thinking of adding a vlookup table on the LIST tab with Aircraft models and a number for how many engines those model aircraft have so when the code ran it would look to see how many rows to create?
    I think im on the right track but I'm not sure how to do it.


    Any help would be appreciated!


    Thank you!



  • What is the password for the VB Editor?

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • You could try this:


    Add a new column to the table on the List sheet columns I:K, the new column (column L) would be the number of engines for each aircraft.


    Then change your code to

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • You're welcome

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

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