ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sumif on last digit (https://www.excelbanter.com/excel-worksheet-functions/136986-sumif-last-digit.html)

Ted Metro

Sumif on last digit
 
Sorry --

I accidentally hit a key and it posted.

I am using the array formula below, but I wonder if it can be done with the
Sumif formula.

=SUM((RIGHT(a1:a4,1)="1")*b1:b4)

I have a list of accounts and their values

101 400
501 100
302 150
405 225

It doesn't work when I do a sumif(a1:a4,"*1",b1:b4) even if I change the
format on column A to text.

Is there an easy way with just the sumif formula and no array"




T. Valko

Sumif on last digit
 
Don't even "mess around" with changing the format in order to get a formula
to work.

Try this:

=SUMPRODUCT(--(RIGHT(A1:A4)="1"),B1:B4)

Biff

"Ted Metro" wrote in message
...
Sorry --

I accidentally hit a key and it posted.

I am using the array formula below, but I wonder if it can be done with
the
Sumif formula.

=SUM((RIGHT(a1:a4,1)="1")*b1:b4)

I have a list of accounts and their values

101 400
501 100
302 150
405 225

It doesn't work when I do a sumif(a1:a4,"*1",b1:b4) even if I change the
format on column A to text.

Is there an easy way with just the sumif formula and no array"






Bernard Liengme

Sumif on last digit
 
Or if you really want to upset grammarians who hate double negatives:
=SUMPRODUCT(--(--RIGHT(A1:A4)=1),B1:B4)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"T. Valko" wrote in message
...
Don't even "mess around" with changing the format in order to get a
formula to work.

Try this:

=SUMPRODUCT(--(RIGHT(A1:A4)="1"),B1:B4)

Biff

"Ted Metro" wrote in message
...
Sorry --

I accidentally hit a key and it posted.

I am using the array formula below, but I wonder if it can be done with
the
Sumif formula.

=SUM((RIGHT(a1:a4,1)="1")*b1:b4)

I have a list of accounts and their values

101 400
501 100
302 150
405 225

It doesn't work when I do a sumif(a1:a4,"*1",b1:b4) even if I change the
format on column A to text.

Is there an easy way with just the sumif formula and no array"








Ted Metro

Sumif on last digit
 
Thanks T. Valko -- you are the man!

"T. Valko" wrote:

Don't even "mess around" with changing the format in order to get a formula
to work.

Try this:

=SUMPRODUCT(--(RIGHT(A1:A4)="1"),B1:B4)

Biff

"Ted Metro" wrote in message
...
Sorry --

I accidentally hit a key and it posted.

I am using the array formula below, but I wonder if it can be done with
the
Sumif formula.

=SUM((RIGHT(a1:a4,1)="1")*b1:b4)

I have a list of accounts and their values

101 400
501 100
302 150
405 225

It doesn't work when I do a sumif(a1:a4,"*1",b1:b4) even if I change the
format on column A to text.

Is there an easy way with just the sumif formula and no array"







T. Valko

Sumif on last digit
 
You're welcome. Thanks for the feedback!

Biff

"Ted Metro" wrote in message
...
Thanks T. Valko -- you are the man!

"T. Valko" wrote:

Don't even "mess around" with changing the format in order to get a
formula
to work.

Try this:

=SUMPRODUCT(--(RIGHT(A1:A4)="1"),B1:B4)

Biff

"Ted Metro" wrote in message
...
Sorry --

I accidentally hit a key and it posted.

I am using the array formula below, but I wonder if it can be done with
the
Sumif formula.

=SUM((RIGHT(a1:a4,1)="1")*b1:b4)

I have a list of accounts and their values

101 400
501 100
302 150
405 225

It doesn't work when I do a sumif(a1:a4,"*1",b1:b4) even if I change
the
format on column A to text.

Is there an easy way with just the sumif formula and no array"










All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com