+ Reply to Thread
Results 1 to 12 of 12

Using VBA with a SUMIF Function to populate a report worksheet

  1. #1
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13
    Posts
    963

    Using VBA with a SUMIF Function to populate a report worksheet

    Hi,

    I have an Excel report that contains a lot of Excel SUMIF Functions & as it has grown, it has become really slow to update.

    I thought of using VBA to speed this process up & wondered if anyone had any report examples or a method to populate Cells using VBA with SUMIF.

    Otherwise, does anyone have better option to populate Cells in a Worksheet using VBA that relies on more than one criteria?

    Thanks in advance. : )
    Remember you are unique, like everyone else

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,870

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Can you attach a sample workbook?
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13
    Posts
    963

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Hi NeedForExcel,

    I've mocked up an example worksheet where I'd like to populate the tables Cells 'B5' - 'K8' Based on the Headings in the table.

    All help appreciated!
    Attached Files Attached Files

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,870

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Don't understand your Excel..

    What is the logic to populate the tables Cells 'B5 - K8'?

  5. #5
    Registered User
    Join Date
    03-12-2014
    Location
    Central Texas
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    If you could modify your example to include what it is you're looking for (even if you have to manually type it in), and/or perhaps a desensitized snippet of your Sumif formula to give us something to start with?
    Oh! I get it. I need rep--->҉

  6. #6
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13
    Posts
    963

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Hi Again,

    I've made a working example of how I would create a SUMIF table using the SUMIF Formula.

    The cells shaded green are the ones I want to use VBA to populate instead of using a Formula.

    Hope this helps.
    Attached Files Attached Files

  7. #7
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,870

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    I think for a problem like this, SUMIF (With Concatenated Values) or SUMIFS would be the best option.

  8. #8
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,445

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Try the attached.
    Attached Files Attached Files

  9. #9
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,870

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    @AB33

    Very nice coding..

  10. #10
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13
    Posts
    963

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Hi AB33,

    Thank you very much, I've been coding for a while but some of your code is new to me.

    Could I trouble you for some comments on your code so I can understand your logic?

    Thanks again, this is exactly what I was after!!


  11. #11
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13
    Posts
    963

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    Hi AB33,

    I've got the idea now, this is very efficient, thank you.

  12. #12
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,445

    Re: Using VBA with a SUMIF Function to populate a report worksheet

    I tried to send you a private message, but it is not working and have already reported it.

+ 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. Sumif function using a variable worksheet name?!
    By blackcat_78uk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 06:51 AM
  2. what function to use to populate data from other worksheet?
    By schueyisking in forum Excel General
    Replies: 4
    Last Post: 08-20-2008, 01:48 PM
  3. Replies: 4
    Last Post: 11-02-2005, 06:20 PM
  4. Can I use two criteria in the SUMIF worksheet function?
    By Patricia in forum Excel General
    Replies: 0
    Last Post: 11-02-2005, 06:17 PM
  5. Input to populate report worksheet
    By victorcab in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-29-2005, 10:19 PM

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