If condition usage

Microsoft Office excel 2007 home & stude...
June 15, 2010 at 04:58:49
Specs: Windows Vista, 3 gb
A B C D
1 BAR =1+3+5 =2+4
2 TUBE
3 BAR
4 TUBE
5 BAR
if i enter bar in column b the corresponding values in the column a should be added, same in case of tube as well , like above.

please give me a formula for that.


See More: If condition usage

Report •


#1
June 15, 2010 at 05:27:44
Hi,

I am not sure how this would work if you are changing the value in cell B1

If B1=BAR, then the relevant results are 1, 3 & 5
but if B1 = TUBE, then the relevant results are 1, 2 & 4

If you put the required text in C1, then it can work as you requested because B1 is always BAR

A	B	C	D
1	BAR	BAR	9
2	TUBE		
3	BAR		
4	TUBE		
5	BAR		

A	B	C	D
1	BAR	TUBE	6
2	TUBE		
3	BAR		
4	TUBE		
5	BAR	


If you use the above layout, then the following formula in cell D1 will give the totals requested:

=SUMIF(B1:B5,C1,A1:A5)

Regards


Report •
Related Solutions


Ask Question