+ Reply to Thread
Results 1 to 13 of 13

Excel for automatically generating PO numbers and using a macro to populate template

  1. #1
    Registered User
    Join Date
    11-07-2019
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    6

    Excel for automatically generating PO numbers and using a macro to populate template

    Hi all,

    I am looking to set up a new PO system on excel. There is a column on the spreadsheet for Yes/No/Blank if the PO's on individual lines have been approved (I have protected this column on the spreadsheet for when this process is in place). My question is twofold,

    1. Is it possible to get excel to generate a sequential PO number based on when the column mentioned above is yes? As at the moment its ordering sequentially even when some PO's are not approved. I have highlighted this in the attachment.

    2. Based on this is it possible to create a macro to automatically populate the data from this excel once it is approved and has a P.O number into an excel P.O template already used in the business also attached?

    Thanks
    R
    Attached Files Attached Files
    Last edited by Rd026; 11-12-2019 at 06:58 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: P.O Posting

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-07-2019
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Hi Alan,

    Apologies, I have updated this now. I hope this is alright now, Please let me know if I need to change anything.

    Thanks,
    R

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    I have created the PO as you describe it however.....

    It will not work in real life.

    You are creating the PO from the index sheet.

    However the index sheet cannot be completed without information that can only come from the PO.

    Eg Qty.... Is that total items in the PO?
    Amount Is that the cost of all the Items on the PO?

    See what I mean? It might be better to create a new PO using a button and update the Index from that.

    I will attach something for you to trial, but I think that we will have to make some changes.


    I am attaching what I have as you are online.

    10 more minutes and you will have something better.
    Attached Files Attached Files
    Last edited by mehmetcik; 11-12-2019 at 07:46 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Ok

    This meets your original request.

    Take a day to play with it and come back with your amendments.

    By the way you should list your suppliers in a table so that you can select the supplier name and have the data auto filled.


    Sorry just spotted an error. Reloaded the attachment.
    Attached Files Attached Files
    Last edited by mehmetcik; 11-12-2019 at 08:14 PM.

  6. #6
    Registered User
    Join Date
    11-07-2019
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Hi Mehmetcik,

    Thank you for your quick response. Apologies I have only been able to glance at the excel spreadsheet so far as I am in work. I just have just a few questions on it.
    Apologies if any of these are stupid questions. Macros are very new to me and again I won't be able to spend too much time on it until after work.

    1. I have tried to copy and paste the code you have suggested in the useful code tab. However, the first sentence in the code is causing the error "Invalid outside Procedure". Can you please suggest how I may fix this?

    2. On the sequencing in column O the numbers that are being generated are based on the number on column A, is it possible to get column O to essentially be the number of the last approved PO + 1. So that the PO Number will populate only when they are approved?

    3. On the PO that opens from the MACRO is it possible to protect the box with the PO number in it? (This is not necessary but I might look into it after).

    4. One part of the code is essentially locking row 7 down. I have tried to change this in the Macro just to row 1000000000 (so that it won’t suddenly stop working) but this hasn’t worked for me.

    Thank you for all your help so far.

    I will get a chance to properly have a look at this later.

    Many thanks again. I really appreciate it,
    R

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    1. The useful code tab. Is for you to learn from. It has nothing to do with this project.
    However you will notice that I used
    Please Login or Register  to view this content.
    in the Solution.

    2. Is it possible to get column O to essentially be the number of the last approved PO + 1. So that the PO Number will populate only when they are approved?
    That is easily done. I normally store the last PO number in the PO Template. It is a minor thing to Increment that and use it when the PO is approved.

    3. On the PO that opens from the MACRO is it possible to protect the box with the PO number in it? (This is not necessary but I might look into it after).
    Again it is easy to either protect the cell with a password or with a small macro. The Macro could reinstate the Invoice Number it you change it, or it could make the cell unselectable. we will work on that.

    4. One part of the code is essentially locking row 7 down.
    I don't think so. I wrote the Macro so you cannot select past row 6 until row 6 is complete.
    Try completing row 6 and then select row 7.

    I will play with this until you get home. Hopefully we will have moved forward.

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Ok.

    This Version is much more practical.

    Select any cell below the last entry and a new po will be created.

    Select the red tab and a new po will be created.

    The Index Sheet will be filled with formulas so that it mirrors the data on the PO.

    Play with this a bit and then tell me.

    1. Where do you want to approve the PO on the PO or on the Index sheet or either?

    2. Do you want to select from a list of names or type in the name each time.

    3. Do you want a password at the approval stage.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-07-2019
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Yes, This version looks incredible thank you!

    To answer your questions

    1. Can we please approve on the actual P.O then link the data back to the index sheet like we have in the other columns. I will just protect the Index tabs columns L,M,N & O with a password so that these cannot be altered without a password.

    2. Typing in the name is fine thank you! I am only a temp in my current place of work so I don't have a complete list of names. Thank you though.

    3. Yes, Can we also protect the approval columns on the PO. Any sort of basic password will do, I am assuming there has to be one password throughout the whole book including protecting the columns I have mentioned above?

    You're a lifesaver, thank you. I will try to learn more about macro's in my freetime now that I can see how useful they could be.

    Thanks again,
    R

  10. #10
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    I will be editing this post quite a bit. So Please Check on it.

    1. On your PO, B13 and B47 are the same Date.

    2. The approvals password is Test

    3. I think that you are missing a trick by having the Approval process on the PO itself.
    Changing the No to a Yes on the index sheet would be a lot more efficient way of doing that.

    Imagine that you have 30 PO's. You have to find the right PO, Scroll to B45 and Select it. Try It.

    Play with this version for now. If you agree then I will make the modifications.

    4. Another trick that you have missed is with Navigation.
    It would be Quite easy to create a macro so that wherever you are in the workbook. Ctrl g would take you back to the index.
    Once there select a PO. Press ctrl g to go to that PO. Just a thought.

    Anyway.

    Have fun.
    Attached Files Attached Files
    Last edited by mehmetcik; 11-13-2019 at 09:47 PM.

  11. #11
    Registered User
    Join Date
    11-07-2019
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Hi Mehmetcik,

    In response to point 3 there I understand what you're saying now and yes I agree with you that it is much more practical to have the approval on the P.O Index rather than on the actual P.O's. If you could please update this that would be great.

    Re, Point 4, I agree that this would be a useful feature, especially when it comes to having a lot of P.O's. If you could do that that would be great. If this will take too much of your time though you can leave it and I will try to do it myself over the weekend. I appr

    Thanks so much!
    R

  12. #12
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Hi

    A few things to try out.

    ctrl q on any sheet to use the navigator.

    Select B17 0n any PO to select a Supplier.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    11-07-2019
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel for automatically generating PO numbers and using a macro to populate template

    Hi Mehmetcik,

    Apologies, I was away for the weekend. Thank you for all your help. I am going to mark this as solved as I am going to personalise it to my job now as we are at a good point.

    Thanks again,
    R

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. new guy posting here
    By Taco in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 03-15-2014, 01:42 PM
  2. Posting
    By CodeMonkeys in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 02-26-2014, 08:53 PM
  3. Add-In for posting
    By shg in forum Tips and Tutorials
    Replies: 4
    Last Post: 08-28-2013, 12:16 AM
  4. Posting
    By yve_ke in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-18-2013, 10:57 AM
  5. posting
    By AdamGus in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-26-2012, 05:22 AM
  6. Job posting
    By Andrew-R in forum The Water Cooler
    Replies: 8
    Last Post: 05-25-2012, 12:34 PM
  7. please help someone (again posting)
    By Tufail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2006, 11:30 PM
  8. Replies: 7
    Last Post: 08-08-2005, 03:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1