+ Reply to Thread
Results 1 to 4 of 4

VBA Sumifs Loop

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    London, Englamd
    MS-Off Ver
    Excel 2007
    Posts
    5

    VBA Sumifs Loop

    Hi All,

    I am fairly new to VBA programing within excel and am really struggling to understand looping.
    I am trying to run a VBA code that will sum the hours from "Data" sheet based on project numbers and dates (stored as text), and calculate the answers in a second sheet (Sheet 2); which has the projects listed vertically down through the rows and the dates horizontal along the top.

    So far I have written the code which will allow me to sumifs the projects for the first column only (Jan-13), but am struggling to see how I can loop the formula to complete the remaining columns (Feb - Nov-13).

    Can any please advise how I can modify the attached code to allow me to do this?

    Thanks!

    Simon
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: VBA Sumifs Loop

    Try this code.......
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Sumifs,Autofill

    Check it example.
    Attached Files Attached Files
    Last edited by davesexcel; 12-08-2013 at 09:26 AM.

  4. #4
    Registered User
    Join Date
    08-13-2013
    Location
    London, Englamd
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Sumifs,Autofill

    Sktneer, davesexcel,

    Both of your codes do the trick perfectly! Thank you for your help with this.

    Simon

+ 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. Loop function SUMIFS
    By jnh0 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2013, 12:35 PM
  2. [SOLVED] Copy dynamically changing column and Paste using VBA Loop (Loop within Loop)
    By nixon72 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2013, 12:46 PM
  3. SUMIFS Puzzle - Trying to avoid adding multiple SUMIFS to get valid result
    By haldavid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-09-2013, 03:42 PM
  4. [SOLVED] Sumifs, problem with the formula: =sumifs(c10:c200,<=today(),0)
    By Faustocruz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2012, 04:26 AM
  5. Why did an inner loop variable start overwriting the outer loop range suddenly?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2012, 03:24 PM

Tags for this Thread

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