+ Reply to Thread
Results 1 to 14 of 14

Sum formula Visible cells only based on Column Header

  1. #1
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150

    Sum formula Visible cells only based on Column Header

    Hi Team,

    Need help in Sum Formula for Visible Cells only based on Column Header.

    Attached is the sample format of the data which has below sheets:

    Table Range RawData - This is rawdata which is formatted in Table range.
    Snapshot - This is the sheet which snapshot where i have updated Slicers with Month & Employee Name based on the Table Range RawData.

    Call Offered
    Call Handled
    Call Handled Within SLA

    The above columns are unique headers in the Snapshot as well as Table Range RawData.

    What i need is a Sum Formula which Sums up the columns from the Table Range RawData based on the header name only for the visible cells in the Table Range RawData when we filter the Data using Slicers.

    Yellow is the highlighted space where i require the formula to be updated.

    I would appreciate, if anyone could help on this please.

    let me know for any clarifications.

    Regards,
    Yadavagiri

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Sum formula Visible cells only based on Column Header

    Just click on a cell within the Table and then select Table Design. Tick "Total Row". This will add the SUBTOTAL function which will sum visible cells.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150

    Re: Sum formula Visible cells only based on Column Header

    Hi TMS, thanks for your reply i tried what you suggested but that doesn't help as it shows the same values for all the employees when referred to total row

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Sum formula Visible cells only based on Column Header

    Not sure I understand what you mean. See attached.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Sum formula Visible cells only based on Column Header

    Maybe try at C4

    =SUM(SUBTOTAL(9,OFFSET('Table Range RawData'!C$1,ROW(RawData)-ROW(RawData[#Headers]),))*('Table Range RawData'!$B$2:$B$7=$B4))

    or

    add another column in Raw Data F2
    =SUBTOTAL(2,[@Month])

    then C4
    =SUMPRODUCT(RawData[Call Offered],('Table Range RawData'!$B$2:$B$7=$B4)*'Table Range RawData'!$F$2:$F$7)

  6. #6
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150

    Re: Sum formula Visible cells only based on Column Header

    hi please help

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Sum formula Visible cells only based on Column Header

    Quote Originally Posted by Yadavgiri View Post
    hi please help
    are you now able to respond to this thread?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150
    Quote Originally Posted by FDibbins View Post
    are you now able to respond to this thread?
    Hi Sir,
    It works once and again later when I reply again, it shows same error.

    Pls help

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: Sum formula Visible cells only based on Column Header

    What error? Post file with error.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  10. #10
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150

    Re: Sum formula Visible cells only based on Column Header

    If you are the site owner (or you manage this site), please whitelist your IP or if you think this block is an error please open a support ticket and make sure to include the block details (displayed in the box below), so we can assist you in troubleshooting the issue.

  11. #11
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150

    Re: Sum formula Visible cells only based on Column Header

    If i try to reply to my thread i get above message and error. sometime it allows to reply and most of the times i get the above message

  12. #12
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Bangalore
    MS-Off Ver
    MS 365
    Posts
    150

    Re: Sum formula Visible cells only based on Column Header

    Hi Bo_Ry,

    Firstly, thank you so much,

    As per above Comment #9

    C4 cell formula works well and as expected, however, headers in my actual rawdata of mine will be misaligned and as per the above formula ill have to manually do it i believe.

    Is there anyway, we can amend the formula where the Subtotal is done based on the header name. Just would require some minor tweet in the above formula. - > If the Header in the Snapshot sheet matches with the rawdata header, then sum the column.

    Please help in this.

    Let me know for any clarifications.
    Last edited by Yadavgiri; 11-13-2021 at 10:43 AM. Reason: change in comment

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Sum formula Visible cells only based on Column Header

    Quote Originally Posted by Yadavgiri View Post
    If i try to reply to my thread i get above message and error. sometime it allows to reply and most of the times i get the above message
    Ok, Im puzzled. So ARE you still getting that error message that wont let you post now, or not?

  14. #14
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Sum formula Visible cells only based on Column Header

    I am blocked by SUCURI. No idea.
    Quang PT

+ 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. Deleting Visible Cells Minus the Row 1 Header
    By ahuang3433 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2020, 04:17 AM
  2. Replies: 2
    Last Post: 02-24-2020, 06:13 AM
  3. Need a Formula to copy data to different cells based on a column header
    By jpiquette in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2019, 12:22 PM
  4. [SOLVED] Pulling a column header based on a cells lowest value
    By kcgojnur in forum Excel General
    Replies: 21
    Last Post: 08-15-2017, 02:13 AM
  5. Input text and visible date in header cells
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2017, 03:10 PM
  6. Replies: 7
    Last Post: 07-25-2014, 05:08 PM
  7. Formula in Column only on visible cells, dynamic referencing?!
    By konfis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-07-2014, 07:35 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