A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

formula help



 
 
Thread Tools Display Modes
  #1  
Old January 17th, 2009, 12:08 AM posted to microsoft.public.excel.worksheet.functions
Araseli
external usenet poster
 
Posts: 8
Default formula help

hello,
I have
A B C B E
1 c 100 90 c
2 c 100 100 b
3 d 200 80 f
4 d 100 90 d
total

I need a formula that will add column B and column C only if columns A & B
are the same.

Thanks!


  #2  
Old January 17th, 2009, 12:11 AM posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
 
Posts: 6,167
Default formula help

You probably meant
=if(a2=D2,b2+c2,"")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Araseli" wrote in message
news
hello,
I have
A B C B E
1 c 100 90 c
2 c 100 100 b
3 d 200 80 f
4 d 100 90 d
total

I need a formula that will add column B and column C only if columns A &
B
are the same.

Thanks!



  #3  
Old January 17th, 2009, 12:21 AM posted to microsoft.public.excel.worksheet.functions
JBeaucaire[_92_]
external usenet poster
 
Posts: 196
Default formula help

I wasn't sure if you're asking for one global answer, or line by line
calculations, so here's both.

To get row 1 to do a simple test, put this in E1 and copy down:
=IF(A1=D1,B1+C1)

To get one answer for the whole table in one cell without the formula above
helping, put this formula down below somewhe

=SUMPRODUCT((A1:A4=D14)*(B1:B4+C1:C4))

Expand the ranges as needed, but make sure they're all the same size.
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Araseli" wrote:

hello,
I have
A B C B E
1 c 100 90 c
2 c 100 100 b
3 d 200 80 f
4 d 100 90 d
total

I need a formula that will add column B and column C only if columns A & B
are the same.

Thanks!


  #4  
Old January 23rd, 2009, 09:40 PM posted to microsoft.public.excel.worksheet.functions
Araseli
external usenet poster
 
Posts: 8
Default formula help

Thank you so much for your help!
i actually needed to total the columns. I rec'd my anser from another post

"Don Guillett" wrote:

You probably meant
=if(a2=D2,b2+c2,"")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Araseli" wrote in message
news
hello,
I have
A B C B E
1 c 100 90 c
2 c 100 100 b
3 d 200 80 f
4 d 100 90 d
total

I need a formula that will add column B and column C only if columns A &
B
are the same.

Thanks!




  #5  
Old January 23rd, 2009, 09:42 PM posted to microsoft.public.excel.worksheet.functions
Araseli
external usenet poster
 
Posts: 8
Default formula help

I actually used the one for the whole table and that worked!
Thank you sooo much!

I have another Q:
If i need to have a count for the columns where A & D are the same which
formula should is use?

"JBeaucaire" wrote:

I wasn't sure if you're asking for one global answer, or line by line
calculations, so here's both.

To get row 1 to do a simple test, put this in E1 and copy down:
=IF(A1=D1,B1+C1)

To get one answer for the whole table in one cell without the formula above
helping, put this formula down below somewhe

=SUMPRODUCT((A1:A4=D14)*(B1:B4+C1:C4))

Expand the ranges as needed, but make sure they're all the same size.
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Araseli" wrote:

hello,
I have
A B C D E
1 c 100 90 c
2 c 100 100 b
3 d 200 80 f
4 d 100 90 d
total

I need a formula that will add column B and column C only if columns A & B
are the same.

Thanks!


  #6  
Old April 18th, 2009, 07:21 AM posted to microsoft.public.excel.worksheet.functions
JBeaucaire[_92_]
external usenet poster
 
Posts: 196
Default formula help

Perhaps:

=COUNTIF($A$1:$A$100,$D$1:$D$100)

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Araseli" wrote:

I actually used the one for the whole table and that worked!
Thank you sooo much!

I have another Q:
If i need to have a count for the columns where A & D are the same which
formula should is use?

"JBeaucaire" wrote:

I wasn't sure if you're asking for one global answer, or line by line
calculations, so here's both.

To get row 1 to do a simple test, put this in E1 and copy down:
=IF(A1=D1,B1+C1)

To get one answer for the whole table in one cell without the formula above
helping, put this formula down below somewhe

=SUMPRODUCT((A1:A4=D14)*(B1:B4+C1:C4))

Expand the ranges as needed, but make sure they're all the same size.
--


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.