SUM ignoring text fields in a non-string of cells

JSC318

New Member
Joined
Jul 17, 2019
Messages
7
Hello,

I am looking to add cell values together, i keep having the value column, an e.g. of what i am trying to add below:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Cell[/TD]
[TD]Person[/TD]
[TD]Day 1[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]User 1 [/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]A10[/TD]
[TD]User 2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]A16[/TD]
[TD]User 3[/TD]
[TD]Sick[/TD]
[/TR]
[TR]
[TD]A84[/TD]
[TD]User 4[/TD]
[TD]Pto[/TD]
[/TR]
[TR]
[TD]A101[/TD]
[TD]User 5[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]A122[/TD]
[TD]User 6[/TD]
[TD]12[/TD]
[/TR]
</tbody>[/TABLE]

I am trying to add the amount sold on each day (in the above e.g. Day 1), I want the formula to ignore cells with the word Sick or PTO, i can't use SUM or "<>#N/A" because the cells i am adding up are random and not in a grouped together range, I need to be able to drag the formula across as it will eventually cover a full year.

Thank you!
 
Update! I have a solve!

Aggregate replacing the + with ,

:)

=AGGREGATE(9,7,(D6,D15,D24,D33,D42,D51,D60,D69,D78,D87,D96,D105,D114,D123,D132,D141,D150,D159,D168,D177,D186))
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
OK, so why couldn't you just use:

=SUM(D6,D15,D24,D33,D42,D51,D60,D69,D78,D87,D96,D105,D114,D123,D132,D141,D150,D159,D168,D177,D186)
 
Upvote 0
Because some cells contained text, so was returning #value result.

[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]12[/TD]
[TD]13[/TD]
[TD]sick[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]5[/TD]
[TD]sick[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]pto[/TD]
[TD]54[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]7[/TD]
[TD]pto[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]pto
[/TD]
[TD]10[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]sick[/TD]
[TD]9[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]pto[/TD]
[TD]6[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]77[/TD]
[TD]sick[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]pto[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]9[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]0[/TD]
[TD]sick[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]SUM of Red in Column A[/TD]
[TD]SUM of Red in Column B[/TD]
[TD]SUM of Red in Column C[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
SUM ignores text and would not give you a #VALUE ! result with that data.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top