+ Reply to Thread
Results 1 to 6 of 6

SumIF for a specific item code

  1. #1
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    SumIF for a specific item code

    Hi please see attachement.

    Can someone please assist in obtaining a excel formula or VBA code that will provide the final result in the highlighted cells. I need to make sure that the formula is dictated by the Account Number (4424-9999) and TO Number. Since I would need to adjust this formula later for different account numbers.


    Need a formula for the highlighted cell in which it looks for cell B1 then get SumIF of the TO Number from Sheet 1. Also I have to make sure the TO608 is sum total is 0 since the amounts are Debit and Credit.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: SumIF for a specific item code

    You will need to provide bit more sample than provided (i.e. TO number other than 4424-9999) so that we can clearly see the structure of your data.

    For ease of calculation and analysis, I'd recommend using PowerQuery/Get & Transform to restructure the data layout.
    Then it's easy process to load it to data model and report on it using Pivot table.

    Your MS-Office ver is 210. I assume it's 2010? PowerQuery is a free add-in for that version.
    In my opinion, it's one of most powerful tool in Excel's arsenal and is under utilized.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    Re: SumIF for a specific item code

    Hi,

    Please see attached more information than one account. As you can see in Sheet2 I need to have sumif of all the Account Numbers (4424-9999/3647-5874/5746-0000) from Sheet 1 as you can see. The highlighted information is the final result I am looking for.
    Attached Files Attached Files

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: SumIF for a specific item code

    Here you go.

    See attached. You can follow the steps in PowerQuery editor.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    Re: SumIF for a specific item code

    Hi,

    Thank you for the help. With the attached power query file. I just want to make one small change. I want to remove column G which is a duplicate of F so I need to remove that and re-run the power query.

    I have tried to edit it but my query keeps on breaking. I tried to edit the source but it wont let me either. Can you please assit?
    Attached Files Attached Files

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: SumIF for a specific item code

    You can either delete it from source table or just do it in PQ editor.

    If you remove from source table. You will need to go into PQ Editor and ensure each steps that refer to department_1 column are changed (mostly Changed Types and Reordered Columns steps).

    See attached.
    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] Vba to match item description and copy/paste item code to other sheet
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2017, 11:29 AM
  2. Replies: 2
    Last Post: 12-14-2016, 12:20 AM
  3. VBA code to create pivot for single pivot item, if required item is not available cre
    By Ishwarind in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2016, 11:06 AM
  4. Replies: 0
    Last Post: 03-12-2014, 05:31 PM
  5. Searching Item Code And Item Number
    By Shi in forum Excel General
    Replies: 3
    Last Post: 11-23-2013, 03:33 AM
  6. Replies: 2
    Last Post: 08-02-2013, 08:04 AM
  7. Replies: 9
    Last Post: 05-22-2011, 09:26 AM

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