Sumar Si (Dos criterios)

JavierPeña

New Member
Joined
Apr 21, 2011
Messages
37
Muy buenas,

Tenga un problema con la función sumar si para dos criterios

Tengo estos datos:
Columna A (fecha)|Columna B (enteros):

<table width="160" border="0" cellpadding="0" cellspacing="0"><col style="width: 60pt;" width="80" span="2"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; width: 60pt;" width="80" align="right" height="17">13/06/2002</td> <td class="xl25" style="border-left: medium none; width: 60pt;" width="80" align="right">1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">14/06/2002</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">2</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">15/06/2002</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">2</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">16/06/2002</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">2</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">17/06/2002</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">6</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">18/06/2002</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">19/06/2002</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">20/06/2003</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; border-top: medium none;" align="right" height="17">21/06/2003</td> <td class="xl25" style="border-top: medium none; border-left: medium none;" align="right">4</td> </tr> </tbody></table>
En otra celda me gustaría calcular el resultado de la suma de la columna B pero sólo para el año 2002.

Hay problemilla: Tengo office 2003 y por ejemplo para calcular cuantos días tengo del año 2002 necesito hacer una función matricial del tipo:

=SUMA((A1:A9>=FECHA(2002;1;1))*(A1:A9<=FECHA(2002;12;31)))

Lo cual me da 7, ahora, como hago suma de la columna B, pero sólo para 2002?

Muchas gracias de antemano!

Saludos,
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
En vez de averiguir las fechas si mismas, ¿no puedes comprobar si la celda de referencía contiene "2002" ? yi si es verdad, sumala. Probalemente tendrías que convertir los contendidos de la celda a texto primero. (espero que me hayas entendido...mi castellano está un pocito ' oxidado'.. !
 
Last edited:
Upvote 0
Hola!

El problema no es la fecha, el problema es saber como hago la función sumar si, no sé como hacerla. (Para que me sume la columna B)
 
Upvote 0
Hola Javier,

La forma más fácil de solucionar algo así es sumar todo y restar lo que quiere eliminar, o sea, algo así:

=SUM(B1:B9)-SUMIF(A1:A9,">="&DATE(2003,1,1),B1:B9)

No tengo Excel en español, pero me imagino que sería algo como

=SUMA(B1:B9)-SUMARSI(A1:A9,">="&FECHA(2003;1;1),B1:B9)
 
Upvote 0
Hola Javier,

Otra opción sería como sigue:
Excel Workbook
CeldaFormula
C1=SUMA(SI(AO(A1:A10)=2002,B1:B10))
Formula Matricial
Introducir con Ctrl+Shift+Enter.
Espero ayude.

Saludos cordiales
 
Upvote 0
Muchas gracias cgcamal,

La fórmula es con ';'

=SUMA(SI(AÑO(A1:A10)=2002;B1:B10))

Pero funcionará en 2003?¿

==================================================

@Greg Truby no consigo que funcione, aparece como resultado una fecha ¬¬

=SUMA(B1:B9)-SUMAR.SI(A1:A9;">="&FECHA(2003;1;1);B1:B9)

<TABLE style="WIDTH: 74pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=99><COLGROUP><COL style="WIDTH: 74pt; mso-width-source: userset; mso-width-alt: 3620" width=99><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 74pt; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 width=99 align=right>15/01/1900


</TD></TR></TBODY></TABLE>
 
Last edited:
Upvote 0
Javier - si el resultado aparece como una fecha, eso no significa que la fórmula está erroneo sino que usted necesita cambiar el formato de la celda que contiene la fórmula. Cualquiera fórmula que devuelve un valor numerico aparecerá como una fecha si tiene la celda está formateado como tal.

Y sí, la fórmula provista por César debe funcionar en Excel 2003 siempre y cuando la confirma con CTRL+SHIFT+ENTER.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,543
Latest member
MartinLarkin

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