+ Reply to Thread
Results 1 to 8 of 8

IF Statements For Totals or Pivots

  1. #1
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    IF Statements For Totals or Pivots

    I am referencing a post made on another forum, trying to figure out a solution on this to help with counting inventory.https://www.mrexcel.com/board/thread...ivots.1239494/

    Attached is a sample data range.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: IF Statements For Totals or Pivots

    What do you expect to see? Where do you expect to see it?

    There is no explanation either in your post, or in your thread and (as far as I can see) no expected answers in your file.

    Help us to help you.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Re: IF Statements For Totals or Pivots

    Sorry, I had it in my original post on the other forum, should of copied it over;
    I am pulling data from MS SQL and I have a few columns that I have to take logic into place in order to get an "add" quantity in a separate column for certain "item code" values. This is my logic that gets the counts, the two columns I need to total are K & L, udf_Qty received- always count if > 0
    udf_Qty pulled - count if (allocated = Y and date allocated <> today) or processed incomplete = Y

    The goal is to just get a total to display just once, so I am not sure if thats possible or if I would have to add a column to get the count of each row first then add a column after that to get the total? I attached a sample copy of file . The last column labeled "add" would what I want my results to be and displayed like this. Would a pivot work for this?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: IF Statements For Totals or Pivots

    OK. I'm struggling to get my head round the criteria:

    the two columns I need to total are K & L, udf_Qty received- always count if > 0 udf_Qty pulled - count if (allocated = Y and date allocated <> today) or processed incomplete = Y


    can you explain in a bit more detail..

    L15, in particular, has me baffled...
    Last edited by Glenn Kennedy; 06-19-2023 at 12:01 PM.

  5. #5
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Re: IF Statements For Totals or Pivots

    The rows are grouped on column B, row 2-4 have the same item code, so L4 is my total I need for those lines. The L15 cell is just the total for that one row because it is the only row with that item code, G15 =Y and that is why I need to count E15 in this instance.

    Column E & F are the two columns I need to add together and the L column is the total of the group. This criteria is correct- udf_Qty pulled - count if (allocated = Y and date allocated <> today) or processed incomplete = Y (6/16/2023 was the today originally)

  6. #6
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Re: IF Statements For Totals or Pivots

    I did receive this possible solution but it is counting one variable twice, the line that is highlighted. I had to do another data sample set to explain better.



    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Re: IF Statements For Totals or Pivots

    New attachment
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Re: IF Statements For Totals or Pivots

    received a correct answer that worked for my spreadsheet, https://www.mrexcel.com/board/thread...ivots.1239494/
    Please Login or Register  to view this content.

+ 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. Replies: 1
    Last Post: 08-26-2022, 01:50 PM
  2. [SOLVED] How to Add Totals in a column with If Then Statements
    By eugchen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-22-2020, 10:56 AM
  3. [SOLVED] Insert Slicer for Pivots Only or can we use it for Charts without Pivots?
    By eldwardo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-02-2013, 04:27 AM
  4. Using IF statements to create totals where words are involved
    By 'MMSA_MAX in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2011, 08:45 PM
  5. Auto Refresh pivots and totals
    By Ivor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2011, 07:35 AM
  6. Cant get totals to work with IF statements
    By spelingchampeon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-09-2005, 10:14 AM
  7. [SOLVED] I would like to build macro's to do pivots or part of pivots
    By Todd F. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2005, 11:05 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