Results 1 to 6 of 6

Thread: Sum using right or left function
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Feb 2016
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Sum using right or left function

    I have a simple attendance tracking spreadsheet. Data validation is set up to select the "violation" from a list. The violation also has a point total attached to it. Example: Call off 1.0, Early out 0.5, NCNS 3.0, etc. How can I sum a range using the "Right" function? I'm only interested in the values 1.0, 0.5, 3.0 etc.

    I can get it to calculate if I do each cell individually:
    =SUM(RIGHT(C3,3),RIGHT(D3,3),RIGHT(E3,3))

    How can I simply highlight the entire date range and use the RIGHT function to calculate the point values? (Columns C-E)

    Name Total Points 8/2/19 8/3/19 8/4/19
    Bill 3.00 Early Out 0.5 Absent 1.0 NCNS 1.5
    Cathy 1.00 Excused 0.0 Early Out 0.5 Early Out 0.5
    Sally 1.50 Tardy 0.5 Tardy 0.5 Tardy 0.5
    John 2.00 Vacation 0.0 Absent 1.0 > 50% shift worked 1.0

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,123
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Sum using right or left function

    How about
    =SUMPRODUCT(--(RIGHT(C2:E2,3)))
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    Mar 2014
    Posts
    2,430
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Sum using right or left function

    Try:

    =SUMPRODUCT(--RIGHT(C3:E3,3))

    PS.... Just saw Fluff's similar response. There is no need for, nor benefit to, putting an extra set of parentheses around RIGHT(C3:E3,3).
    Last edited by joeu2004; Aug 11th, 2019 at 10:16 AM.

  4. #4
    New Member
    Join Date
    Feb 2016
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Sum using right or left function

    Works perfectly! Thank you both.

  5. #5
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,123
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Sum using right or left function

    Glad we could help & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  6. #6
    New Member
    Join Date
    Feb 2016
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Sum using right or left function

    Need help with one more thing. I've modified your formula a bit. It works as expected with one exception...I need to include something that will avoid throwing an error if there's a blank cell in the range. I've tried a few different things all producing different results. Just to clarify the blank cell would be in E3:NX3.

    =SUMPRODUCT(--(INT($E$2:$NX$2>TODAY()-365)),--(RIGHT(E3:NX3,3)))

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •