+ Reply to Thread
Results 1 to 4 of 4

VBA SUMIFS if the adjacent cell is not blank

  1. #1
    Registered User
    Join Date
    12-19-2020
    Location
    Turkey
    MS-Off Ver
    2019
    Posts
    11

    VBA SUMIFS if the adjacent cell is not blank

    Hey Guys,

    I have created this book which draws a bunch of raw data onto a sheet ("Raw Data") which is later transferred to another sheet ("Clean Data") with a copy and remove duplicates using VBA.

    I need a VBA code which will SUMIFS the relevant data from Raw Data sheet on to Clean Data Sheet Column E, until the last row on column D is blank. I am intending to use this for my dynamic charts so I just can't write the regular formula and drag down. Please see the Book uploaded to see what I mean.

    I want the SUMIFS to work with the item name and name of the month, extending to the right with the 12 months.

    It would be great if you guys could lend me a hand at this as I am a complete newbie and my VBA knowledge does not go beyond copying and removing duplicates.
    Attached Files Attached Files
    Last edited by Allan91; 12-19-2020 at 05:01 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,487

    Re: VBA SUMIFS if the adjacent cell is not blank

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    12-19-2020
    Location
    Turkey
    MS-Off Ver
    2019
    Posts
    11

    Re: VBA SUMIFS if the adjacent cell is not blank

    Hi Ali!

    I have uploaded the Book as well.

    Thanks for your guidance.
    Last edited by Allan91; 12-19-2020 at 05:02 AM.

  4. #4
    Forum Contributor
    Join Date
    08-26-2016
    Location
    UK
    MS-Off Ver
    O365
    Posts
    258

    Re: VBA SUMIFS if the adjacent cell is not blank

    This is a muddle; there are 2 tables on the Raw Data sheet, one starting in column C, 3 columns wide, and another table starting at column G, much wider.
    The first table has month names from January to December, the second table has dates all in January.
    Apart from these tables having the same number of rows they seem unrelated.

    You talk of Item Name, but in your Clean Data sheet you only look at column D - Expense Type.

    In the attached is a complete guess; I've made a pivot table (a very, very basic one) at cell Q3. Is this what you want?
    I've also added a chart, but it probably charts the wrong things -- just thrown in for good measure.

    No vba code required.
    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. [SOLVED] IF formula to have interest cell go to 0 (blank) when adjacent balance cell is 0 (blank)
    By BryanHCR in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2019, 03:38 PM
  2. Replies: 6
    Last Post: 05-24-2017, 06:34 AM
  3. Replies: 4
    Last Post: 04-18-2017, 07:09 AM
  4. Replies: 5
    Last Post: 08-15-2014, 08:33 AM
  5. Replies: 4
    Last Post: 05-15-2014, 09:32 AM
  6. [SOLVED] Need a Cell (with formula) to be Blank if adjacent cell is blank - Help!!
    By mitrbikram in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 07-25-2012, 09:15 AM
  7. If cell blank than adjacent cell blank (with drop down)
    By pandagurl in forum Excel General
    Replies: 2
    Last Post: 10-06-2011, 03:27 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