Macro Help Needed

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Hi Guys,


    I need help creating an invoicing macro, as I am new to Vba. It needs to create a new invoice(sheet) based of every unique value in column A while adding the corresponding datas. Rows can differ, it should work for 1 row or 1000. Each invoice must have the same invoice date & due date, otherwise macro should stop to avoid error completion. "Data" sheet can be rearranged per your desire if transpose method is being used for copy(completion). New sheet can be added if you'd filter to filter/copy datas there :)


    I hope this is not something too hard and you guys can help me!


    Thank you,

  • Try the attached file. I have modified the Invoice_Template to unmerge the merged cells. You should avoid using merged cells at all cost as they almost always create problems for macros. Click the button on the Data sheet.

    Files

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Try the attached version. What do you mean by:

    Quote


    the yellow PO, that should not be added, while the lines are being deleted

    Files

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Mumps PO is being added on C column also, while it's not needed. Tabel lines are being deleted where info is being copied(check photo1). I am thinking about below :D


    What library should I reference as on my work pc it's says Sub not defined?

  • You are very welcome. :)

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

Participate now!

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