+ Reply to Thread
Results 1 to 9 of 9

Search Invoice Code to Fill in Invoice Details

  1. #1
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Search Invoice Code to Fill in Invoice Details

    Hello,

    Is there VBA that can be assigned to the shape "Search Invoice" on the Invoice Template sheet? Cell O4 should have a drop down list of all previous invoices to select from. Once the Invoice in question is entered in cell O4 click on the shape to run the code.

    Thank you for your help
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Search Invoice Code to Fill in Invoice Details

    I should have mentioned that the code will fill in the invoice from both the Invoice List and Invoice Items sheets. I also have data validation list in the cell to choose from previous invoices.

    Thank you
    Attached Files Attached Files
    Last edited by billy60; 04-01-2023 at 03:53 AM.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Search Invoice Code to Fill in Invoice Details

    Begin by unmerging the cells in D18:F27. You should avoid merging cells because they almost always cause problems for macros. Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your "Invoice Template" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Make a selection in cell O4. You don't need the button.
    Please Login or Register  to view this content.
    Last edited by Mumps1; 04-01-2023 at 11:13 AM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Search Invoice Code to Fill in Invoice Details

    Thank you very much for your help.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Search Invoice Code to Fill in Invoice Details

    You are very welcome.

  6. #6
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Search Invoice Code to Fill in Invoice Details

    I ran into issues after doing a few searches. Maybe the merged cells aren't the problem. I do need them for perhaps multiple messages to the customer.

  7. #7
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Search Invoice Code to Fill in Invoice Details

    I updated the Invoice Template sheet so that there aren't merged cells. I needed to save the info there so I added code to the List code so there are separate lines for each D30:D34. These are saved fine now.

    I will now need a way to retrieve all of this information for the search previous invoices.

    Can this be done?
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Search Invoice Code to Fill in Invoice Details

    Re: I do need them for perhaps multiple messages to the customer
    Mumps mentioned it in his post. Here are a few articles to read.
    https://edu.gcfglobal.org/en/excel-t...rging-cells/1/
    https://theexcelclub.com/stop-do-not...hy-with-fixes/
    https://www.perfectxl.com/excel-tool...t-merge-cells/
    Experience trumps academics every day of the week and twice on Sunday.

  9. #9
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Search Invoice Code to Fill in Invoice Details

    You still had merged cells in D18:F27. I have unmerged them and it works properly. Try the attached file.
    I will now need a way to retrieve all of this information for the search previous invoices.
    I'm not sure what you mean by this statement. Please explain in detail referring to specific cells, rows, columns and sheets using a few examples from your data.
    Attached Files Attached Files

+ 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. [SOLVED] Invoice Details Not Saving Properly to Invoice Payments sheet
    By 75Rupert in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-07-2022, 08:00 AM
  2. [SOLVED] Lookup up a project code and return 1st invoice date, then 2nd invoice date, etc.
    By knykil in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-13-2022, 08:04 PM
  3. Replies: 10
    Last Post: 02-20-2019, 11:34 AM
  4. Importing Invoice details
    By alfgrey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2014, 01:48 PM
  5. Customer Details on Invoice drop down box
    By Rockhopper in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2013, 05:53 AM
  6. Replies: 4
    Last Post: 11-04-2012, 12:43 PM
  7. Payment Details- Invoice
    By Lame Brain in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-15-2008, 08:15 AM

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