+ Reply to Thread
Results 1 to 17 of 17

VBA/MACRO for Auto detecting rows with items passing certain criterias

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    VBA/MACRO for Auto detecting rows with items passing certain criterias

    Hi guys,

    I have a workbook here that has a array formula on "Shipped" worksheet on Column A. Basically, this array formula will detect row numbers of items from different worksheet/workbook which passes multiple criterias.

    What I want is to make it a VBA if its possible. I don't know anything about VBA or Macros but all I want is to make my workbook more faster. The array formula seems make my workbook unresponsive. That's why i'm gonna try VBAs and hope it will solve my problem.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    hi acerlaptop, option, please check attachment
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    hi acerlaptop, option, please check attachment
    ok you got me amazed there.! ^^

    how do I edit your code to my preferences???

  4. #4
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by acerlaptop View Post
    ok you got me amazed there.! ^^

    how do I edit your code to my preferences???
    there are differences between that sample and my actual data. the column reference doens't actually match, the column header doesn't match, my data entry on my actual summary starts on row four not row 2 as compared to the data reference which starts at row 2. and so on ^^

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    can you tell me the reason of making sample file data layout different from the original data layout?

  6. #6
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    can you tell me the reason of making sample file data layout different from the original data layout?
    well i can't really remake the exact data because it's too bulky, but if you want I can attach my original data..

  7. #7
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    can you tell me the reason of making sample file data layout different from the original data layout?
    or you can just help me edit your code to my preference.. ^^ I also want to learn VBAs ^^

  8. #8
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by acerlaptop View Post
    or you can just help me edit your code to my preference.. ^^ I also want to learn VBAs ^^
    and one more thing, I will also be using this code on my other reports, which basically doesn't really match with my current data. So please just let me know how to edit your code.

    Would really appreciate if you could do that for me.

    Thanks..

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    please provide sample file with the same data layout as in you original data file. The code needs input parameters: kind, date from, date to, source data table fields and result table fields. All of those as per layout of the real data file.

  10. #10
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    please provide sample file with the same data layout as in you original data file. The code needs input parameters: kind, date from, date to, source data table fields and result table fields. All of those as per layout of the real data file.
    ok.. i'll attache the data.. but i will also be using your code on my other reports. thats why i want to know how to edit your code to adapt it to my other reports which basically requires same procedures and end result but different structure..

    anyway here's the data.

    The delivered worksheet is my summary, reference is in the summary work sheet (merchant name, date from, and date to)
    oms data is the data source.
    created date from (oms data) column F
    date delivered from (oms data) column J
    SKU from (oms data) column C
    Details from (oms data) column D
    Unit price from (oms data) column E
    Sales order item from (oms data) column B
    Seller SKU from (oms data) column AB
    Order no. from (oms data) column A
    Status from (oms data) column M
    Destinataion from (oms data) column L (please replace all "~" with space " ")
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    as far as I understand the data from OMS file should be filtered for Seller name and Reconciliation Period and status Delivered from SC FEB file sheet Summary. The result should a sheet with the 10 fields specified above. Which date should fall into the reconciliation period created or delivered or both? Is it correct?

  12. #12
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    as far as I understand the data from OMS file should be filtered for Seller name and Reconciliation Period and status Delivered from SC FEB file sheet Summary. The result should a sheet with the 10 fields specified above. Which date should fall into the reconciliation period created or delivered or both? Is it correct?

    yes that's correct..
    the recon period should be the date delivered..
    and you can remove the row column on delivered worksheet..
    Last edited by acerlaptop; 02-17-2015 at 12:09 AM.

  13. #13
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    as far as I understand the data from OMS file should be filtered for Seller name and Reconciliation Period and status Delivered from SC FEB file sheet Summary. The result should a sheet with the 10 fields specified above. Which date should fall into the reconciliation period created or delivered or both? Is it correct?
    additional:

    Region from (Location Mapping worksheet) column B based on region
    Shipment Provider (OMS Data) column Y
    Delivery Rate from (Delivery Rate Card) table based on "region" and "shipment provider"
    Last edited by acerlaptop; 02-17-2015 at 12:08 AM.

  14. #14
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    please check attachment, press Run button on Summarry sheet, in Open file window select OMS file, result goes to Delivered sheet
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    please check attachment, press Run button on Summarry sheet, in Open file window select OMS file, result goes to Delivered sheet
    Run-time error '7':

    Out of memory

    help.. thanks..

  16. #16
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    I do not get such error on a sample file provided. Try this option then
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    10-21-2014
    Location
    Makati
    MS-Off Ver
    MS365
    Posts
    74

    Re: VBA/MACRO for Auto detecting rows with items passing certain criterias

    Quote Originally Posted by watersev View Post
    hi acerlaptop, option, please check attachment
    Hi, I'm downloading the file you attached but for some reason, the downloaded file don't have macro in it.

    Hope you can help thanks

+ 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. Count items in a column based on multiple criterias
    By cgonzo1970 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2014, 04:27 PM
  2. [SOLVED] I need a Macro that doubles rows when criterias are matched
    By isasa74 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-30-2012, 01:56 PM
  3. Macro to Auto Populate ALL data based on IF/Match Criterias
    By trulyawesome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-23-2012, 06:04 PM
  4. Replies: 5
    Last Post: 01-02-2012, 12:09 PM
  5. Auto hide rows when items are out of stock
    By wiredafrican in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-18-2011, 01:49 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