SumIf right = 1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I need to make a sum if from A5 to B100 if right A5:A100 =1

So what I mean is only sum if right A = 1

when I say A I mean:


A1
A2
A3
A....


regards,
Marco
 
Marco said:
Hi. I need to make a sum if from A5 to B100 if right A5:A100 =1

So what I mean is only sum if right A = 1

when I say A I mean:


A1
A2
A3
A....


regards,
Marco

This formula will sum values in B5:B100 where the corresponding value in
A5:A100 equals 1:
=SUMIF(A5:A100,1,B5:B100)

I don't understand what you mean by "right A", though. Post back explaining
this if you need more help.
 
Hi.

My value in column a are:

1.2
7.1
4.2
4.1
......

if the the value is 1 I want to SUM.

such as 7.1 and 4.1

if you make a right 1 to this you will get the result = 1

So I want to sum if right is 1, witch will sum 4.1 and 7.1


Regards,
Marco
 
I'd use something like:
=SUMPRODUCT(--(RIGHT(TEXT(A1:A10,"0.00000"),6)=".10000"),A1:A10)

You may need to increase the decimal places depending on your data.

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html
 
If your values in column A are numbers, try
=SUMPRODUCT((ROUND(A5:A100-INT(A5:A100),1)=0.1)*B5:B100)

If they are text strings, try
=SUMPRODUCT((RIGHT(A5:A100,1)="1")*B5:B100)
 
Back
Top