# Sum using right or left function

#### sneaky911

##### New Member
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

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

#### Fluff

##### MrExcel MVP, Moderator
=SUMPRODUCT(--(RIGHT(C2:E2,3)))

#### joeu2004

##### Well-known Member
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:

#### sneaky911

##### New Member
Works perfectly! Thank you both.

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback

#### sneaky911

##### New Member
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)))

1,078,461
Messages
5,340,440
Members
399,375
Latest member
alwayssunny

### This Week's Hot Topics

• Problem with Radio Button's format control
I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
• Last Display on userform to a Listbox
[CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
• Rename and move files to a new location
Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
• Help with True/False Formula
Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
• Clear extra characters from a provided range of cells
Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
• Help with Current and highest streaks
Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...