Adding cells from different spreadhseets

Iain McBride

New Member
Joined
Aug 17, 2018
Messages
38
Hi - another query for people more Excel savvy than me......

I am trying to make a cumulative total of people attendance from different spreadsheets onto a master template but discounting the term "#N/A"

So, I am trying to total the numbers from cells C15:AH15
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[TD]N
[/TD]
[TD]O
[/TD]
[/TR]
[TR]
[TD]...
[/TD]
[TD]Bob
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]Joe
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]N
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]Sal
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]Vernon
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]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
[/TR]
[TR]
[TD]13
[/TD]
[TD]...
[/TD]
[TD]Y
[/TD]
[TD]N
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14
[/TD]
[TD]...
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD]Y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD][/TD]
[TD]12
[/TD]
[TD]8
[/TD]
[TD]12
[/TD]
[TD]9
[/TD]
[TD]9
[/TD]
[TD]#N/A
[/TD]
[TD]#N/A<strike></strike>
[/TD]
[TD]#N/A
[/TD]
[TD]#N/A<strike></strike>
[/TD]
[TD]#N/A
[/TD]
[TD]#N/A<strike></strike>
[/TD]
[TD]#N/A
[/TD]
[TD]#N/A<strike></strike>
[/TD]
[/TR]
[TR]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

The auto calculation I have doesn't work but the cells carry #N/A when not completed - is there a way to add all the cells up (but ignoring cells with "#N/A"?

Thanks - sorry for the poor explanation!!!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
What is the exact formula that is returning the #N/A?

Note that you should be able to handle it by wrapping it in an IFERROR statement, i.e.
=IFERROR(original formula,0)
 
Upvote 0
Hi Joe - the #N/A is created when there is a blank cell attached the following formula:

=SUMPRODUCT(--(MATCH(L3:L14,L3:L14,0)=ROW(L3:L14)-ROW(L3)+1),--(LEFT(L3:L14,1)="G"))+COUNTIF(L3:L14,"1:1")
 
Upvote 0
So, if that formula is returning the #N/A error, you can modify it to return a 0 or empty string instead of the error using the method I proposed.

To return a 0:
=IFERROR(SUMPRODUCT(--(MATCH(L3:L14,L3:L14,0)=ROW(L3:L14)-ROW(L3)+1),--(LEFT(L3:L14,1)="G"))+COUNTIF(L3:L14,"1:1"),0)

To return an empty string:
=IFERROR(SUMPRODUCT(--(MATCH(L3:L14,L3:L14,0)=ROW(L3:L14)-ROW(L3)+1),--(LEFT(L3:L14,1)="G"))+COUNTIF(L3:L14,"1:1"),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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