+ Reply to Thread
Results 1 to 9 of 9

Display in the message box, how many entries for a supplier on a reporting month

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Display in the message box, how many entries for a supplier on a reporting month

    Greetings!

    I'm trying to use VBA to populate a worksheet to record sales for each supplier on a given month.

    Putting the data in the worksheet is actually alright as per the code below. However, I need to upgrade it as it is now possible to have multiple entries for the same reporting month. As per the example on the attached, EDF Energy (G) has already one entry for the same reporting month, i.e., Feb 2022 (O). The last entry (row 4) is what I'm aiming to achieve.

    What I would like to achieve is that:
    1- The VBA would give a message prompt in which it will display the number of entries for the same reporting month on the same supplier. In this example, that would be 1. This number is taken from the column AA where the number of duplication is counted.
    2- The prompt will list (not more than 5 entries) each sales made for every entry on the message box [this would be optional] (I just want to see whether I can easily see these individual figures so the person who enters the data doesn't have to check back to the sales worksheet.

    Here is the code I used to achieve the data recording but obviously I got stuck on the message box bit.

    Please Login or Register  to view this content.
    I hope what I wrote makes sense.

    Thank you very much.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Display in the message box, how many entries for a supplier on a reporting month

    I believe this is what you're looking for...
    Please Login or Register  to view this content.
    Last edited by carlmon; 05-12-2022 at 11:26 AM.

  3. #3
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Display in the message box, how many entries for a supplier on a reporting month

    Thanks. I think your code, particularly the last part, does include an element of what I would like to achieve but not sure how can I use it to resolve my issue.

  4. #4
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Display in the message box, how many entries for a supplier on a reporting month

    Can you copy and paste the section of your code where you want the (optional) message box to appear, and I'll focus on integrating a code into yours?

  5. #5
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Display in the message box, how many entries for a supplier on a reporting month

    Quote Originally Posted by carlmon View Post
    Can you copy and paste the section of your code where you want the (optional) message box to appear, and I'll focus on integrating a code into yours?
    I have put in red where the count should appear on the message box. Hope it makes some sense.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Display in the message box, how many entries for a supplier on a reporting month

    I guess, what I'm attempting to do is to get the corresponding value of dpRng in the column AA so I can add that in the MessageBox as per the following code
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Display in the message box, how many entries for a supplier on a reporting month

    Replace your Code:
    Please Login or Register  to view this content.
    with:


    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Display in the message box, how many entries for a supplier on a reporting month

    Tweaked a bit but it worked. Thanks a lot.

  9. #9
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Display in the message box, how many entries for a supplier on a reporting month

    Great!
    If I helped you out, please consider adding rep!
    Also, please consider posting your working code, in the chance that someone else stumbles across this thread looking for a similar solution.
    All the best
    Alec

+ 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] Formula to return Yes if the Supplier is Xomo and if the Supplier Bisum job title
    By lachonda1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-06-2020, 06:43 PM
  2. [SOLVED] Calculate a YTD Total based on Reporting Month and Week of Month via drop down selections
    By Miskondukt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2018, 05:14 PM
  3. [SOLVED] Display column entries in row as vertical entries in a userform listbox
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-22-2016, 08:10 AM
  4. [SOLVED] Automating Month End Reporting Calendar
    By Excel-Access in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2015, 12:23 PM
  5. Display current month working days in a message box
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 07:18 AM
  6. Replies: 1
    Last Post: 05-30-2013, 09:37 AM
  7. SUM according to Month and Supplier
    By koteshi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-26-2011, 02:55 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