+ Reply to Thread
Results 1 to 5 of 5

VBA code needed: SUMIF loop through column, sum when blank cell found

  1. #1
    Registered User
    Join Date
    10-20-2017
    Location
    Seattle, WA USA
    MS-Off Ver
    MS Office 2010 & Windows 7
    Posts
    20

    VBA code needed: SUMIF loop through column, sum when blank cell found

    I am trying to write VBA code for this

    =SUMIF(Q:Q,"S",N:N)

    Column N is where I want the value results to be. I want it to populate via sumif results in the first blank "" cell in the range of Column N.

    So really just to loop every cell in column N and then at first blank cell, insert the =SUMIF(Q:Q,"S",N:N)

  2. #2
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Perth Western Australia
    MS-Off Ver
    Office 365
    Posts
    257

    Re: VBA code needed: SUMIF loop through column, sum when blank cell found

    Hi

    Can you please upload a desenitised copy of your spreadsheet. It will make life easier to write and test.

    Cheers

  3. #3
    Registered User
    Join Date
    10-20-2017
    Location
    Seattle, WA USA
    MS-Off Ver
    MS Office 2010 & Windows 7
    Posts
    20

    Re: VBA code needed: SUMIF loop through column, sum when blank cell found

    I cannot upload for some reason so here is a screenshot

    Capture.PNG

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: VBA code needed: SUMIF loop through column, sum when blank cell found

    A screenshot is useless!

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    I will move this thread to the VBA section.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    10-20-2017
    Location
    Seattle, WA USA
    MS-Off Ver
    MS Office 2010 & Windows 7
    Posts
    20

    Re: VBA code needed: SUMIF loop through column, sum when blank cell found

    Thanks for the tip ALIGW, very helpful.

    I added the xlsm attachment
    Attached Files Attached Files

+ 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. SUM Column until blank cell is found
    By MrSmoofy in forum Excel General
    Replies: 5
    Last Post: 08-07-2015, 06:54 AM
  2. [SOLVED] If value found in column then enter that value after last blank cell
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-15-2015, 11:39 AM
  3. [SOLVED] Set cell to = 0 / blank if value is found in a column.
    By SalientAnimal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2014, 05:34 AM
  4. Loop through Column to find decimal then pass found row to bookmark code
    By beenbee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2014, 11:13 AM
  5. [SOLVED] If Cell in column B blank then various cell are blank - vba tweek needed!!!
    By skyping in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2013, 12:24 PM
  6. VBA code to Subtract values in Column F with Column E if found non-blank
    By hydz1213 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2013, 04:34 AM
  7. [SOLVED] Code needed to move cell value from one sheet to another if match is found.
    By SLIDE1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2012, 07:46 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