+ Reply to Thread
Results 1 to 2 of 2

SumIfs Update between two tables

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    London
    MS-Off Ver
    2016
    Posts
    24

    SumIfs Update between two tables

    Hi everyone,

    I have written a VBA code that is supposed to update one table by referring to another table on the same sheet. I have used the SumIfs formula since I have 2 columns taken as decisive basis for the allocation of data (Att1 to Att4). What I basically want to achieve is that the first two columns of each table are compared and if a match is found, I want this macro to build a sum of those elements in the corresponding row.

    My code is:

    Please Login or Register  to view this content.
    The excel-file is attached. Could anybody tell me what's wrong with my code?

    Thank you very much in advance! SumIfs Update.xlsm
    Last edited by birdmannn; 01-02-2016 at 07:43 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: SumIfs Update between two tables

    I am not sure exactly what you want. I'm guessing you want to summarize A-D and D-A, etc.

    What I did in the attachment was make a composite key using the formula:=IF(A2<B2,A2&":"&B2,B2&":"&A2). This formula concatenates the first two columns in alphabetical order. Then I applied a pivot table to using the composite as a row header.
    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. How to update a lot of pivot tables at once
    By pgft in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-11-2014, 06:09 AM
  2. Pivot tables update with VBA
    By sehested in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 07:26 PM
  3. [SOLVED] sumifs based on conditions from 2 seperate tables
    By hcyeap in forum Excel General
    Replies: 3
    Last Post: 03-14-2014, 11:02 AM
  4. VBA to Update tables in other Sheet
    By rjnewsome in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2013, 09:40 PM
  5. How to update 2 tables at the same time?
    By ravikiran in forum Access Tables & Databases
    Replies: 4
    Last Post: 09-25-2012, 08:47 AM
  6. Update all pivot tables
    By randolphoralph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2012, 12:49 PM
  7. formula for two tables, possible sumifs
    By batjl9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-18-2011, 03:39 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