+ Reply to Thread
Results 1 to 6 of 6

Macro to automate our reporting task

  1. #1
    Registered User
    Join Date
    11-19-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    21

    Macro to automate our reporting task

    Hi Guys,

    I need help to speed up our reporting task and I'm trying to solve this through VBA solution. Below are the conditions for the project and I'm really struggling on how I can make this work and integrate all of these in one solution. Please see the attached file for reference.

    Conditions:

    1. If PO's have same reference number and doc. type or there's only a single PO and the document type is KP, the status is always "for PO Closure". If doc. Type is ZM/RE,
    status is "Pending with GR". If doc. type is WE status is "Pending with IR". If doc. type is WL, status is "With returned GR".
    2. If PO's are the same but have different document type and the cell on Vendor1 column is blank, below is the condition:
    a. Sum the amount of PO with same reference number and document type. If ZM/RE is more than WE in the PO group, status is "IR>GR". If WE is more than ZM/RE in
    the PO group, status is "GR>IR".
    3. If the PO's are the same but have different document type and the cell on Vendor1 column is not blank, below are the conditions:
    a. Sum the total amount of PO with same reference number and regardless of document type. If total amount is less than 2,500 USD and cell on column Del
    completed is ticked as yes, status is "for PO closure".
    b. Sum the total amount of PO with same reference number and regardless of document type. If total amount is more than 2,500 USD and cell on column Del
    completed is ticked as yes, status is "verify if for PO closure"
    4. VBA/formula should be variable to accommodate any number of rows.

    Thank you in advance and it will be greatly appreciated any assistance that you'll provide. More power to Excel Forum!
    Attached Files Attached Files
    Last edited by geh17; 08-16-2017 at 08:40 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Macro to automate our reporting task

    Hi geh,

    As I start putting in formulas in your Status column and get to step 2 I was wondering... Is the whole problem done if we simply put your required words in the Status Column? See what I have so far.

    Needs a VBA Solution.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    11-19-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    21

    Re: Macro to automate our reporting task

    Hi Marvin,

    Yes, if all of the requirements can be integrated in one formula on the status column, much better.

    Just additional details, for step 1, as long as the group of PO's (doesn't matter if 1 or more than 1 PO) with same number have the same doc. type, the status should be as stated on step 1.

    But if the group of PO's with same number and 1 or more PO's in this group have a different doc. type, step 2 & 3 will apply.

    For example, PO reference number 3500152140 consists of 10 doc. type RE and 1 doc. type WE, step 2 & 3 will apply.

    Hope it helps for clarification.

    Thank you.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Macro to automate our reporting task

    Hi geh,

    My goal is to have you help write this formula so you can "fix" it later when your requirements change. Have you seen what I've done so far? Can you tell me how it works? Do you think you might add the next step?

  5. #5
    Registered User
    Join Date
    11-19-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    21

    Re: Macro to automate our reporting task

    Hello Marvin,

    Thanks for the feedback.

    I can modify the solution for step 1 but unfortunately, I really have no idea how to make step 2 & 3 works based on the pivot table that you have provided.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Macro to automate our reporting task

    Can you show me the answer to your question in an attached file? I'm confused by your last few steps.

+ 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. Trying to automate reporting from multiple sheets.
    By tzelja219 in forum Excel General
    Replies: 1
    Last Post: 05-20-2017, 10:35 AM
  2. Creating a macro to automate a Subtotals task
    By pharmerjoe7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2017, 12:42 PM
  3. Need to make a macro for weekly reporting task- never used a macro before
    By mccartneyd1795 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 06:04 PM
  4. Automate Reporting in Excel
    By pacino in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 07:32 PM
  5. Automate Reporting Excel
    By smylod in forum Excel General
    Replies: 1
    Last Post: 03-02-2009, 04:51 PM
  6. [SOLVED] macro for excel, automate task
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2006, 10:45 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