Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
smiths4
 
Posts: n/a
Default Formula to sum two cell values

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4
  #2   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default Formula to sum two cell values

You may use SUMPRODUCT for this, something like:
=SUMPRODUCT(--(A1:A6="Doctor"),--(B1:B6=1))
Change the ranges and values as appropiate.

Hope this helps

"smiths4" wrote:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4

  #3   Report Post  
Posted to microsoft.public.excel.misc
Marcelo
 
Posts: n/a
Default Formula to sum two cell values

Hi

=sumproduct(--(A2:A7="Doctor")*(c2:c7=1))

hth
regards from Brazil
Marcelo

"smiths4" escreveu:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4

  #4   Report Post  
Posted to microsoft.public.excel.misc
smiths4
 
Posts: n/a
Default Formula to sum two cell values

Thank you for your help Miguel, but the sumproduct multiplies the cells I
want it to count... for example my result would be Doctors 3.

"Miguel Zapico" wrote:

You may use SUMPRODUCT for this, something like:
=SUMPRODUCT(--(A1:A6="Doctor"),--(B1:B6=1))
Change the ranges and values as appropiate.

Hope this helps

"smiths4" wrote:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4

  #5   Report Post  
Posted to microsoft.public.excel.misc
Marcelo
 
Posts: n/a
Default Formula to sum two cell values

OK, but is not your first question
so to count =sumproduct(--(a2:a7="doctor"))

hth
regards from Brazil
Marcelo

"smiths4" escreveu:

Thank you for your help Miguel, but the sumproduct multiplies the cells I
want it to count... for example my result would be Doctors 3.

"Miguel Zapico" wrote:

You may use SUMPRODUCT for this, something like:
=SUMPRODUCT(--(A1:A6="Doctor"),--(B1:B6=1))
Change the ranges and values as appropiate.

Hope this helps

"smiths4" wrote:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4



  #6   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Formula to sum two cell values

And as a result I need the formula to tell me how many doctors have a "1"
rating.

As I understand from your question you need to count those Doctors who
have gained "1". Unfortunately, the criteria required to be in 2
different columns.

You can go for this simple solution:
1-Insert a new column between these two columns (I do not know if you
use "B" or not")
2- Concatenat the first column content to the third column content by
using the "&" operator --------- it should look like "doctor1",
"doctor2",...etc
3-use the following formula in any cell :
Countif (Range, "doctor1") {here i search for doctors who has 1}
the formual will count the number of doctors who have "1" only.

4-you can select the inserted column and Hide it.

Hope it works with you and helps.

Hesham Elhadad

  #7   Report Post  
Posted to microsoft.public.excel.misc
smiths4
 
Posts: n/a
Default Formula to sum two cell values

Thank you it worked perfectly. Just curious, in the formula what does the --
stand for?

"Marcelo" wrote:

Hi

=sumproduct(--(A2:A7="Doctor")*(c2:c7=1))

hth
regards from Brazil
Marcelo

"smiths4" escreveu:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4

  #8   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Formula to sum two cell values

The -- is extraneous: it's supposed to convert boolean (or any) value into
numeric

You could write as well =sumproduct(--(A2:A7="Doctor")*(c2:c7=1))
since the * (multiply) sign forces both operands to be converted into
numeric

HTH
--
AP

"smiths4" a écrit dans le message de
news: ...
Thank you it worked perfectly. Just curious, in the formula what does
the --
stand for?

"Marcelo" wrote:

Hi

=sumproduct(--(A2:A7="Doctor")*(c2:c7=1))

hth
regards from Brazil
Marcelo

"smiths4" escreveu:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a
"1"
rating.

Please help.

Thanks
smiths4



  #9   Report Post  
Posted to microsoft.public.excel.misc
Marcelo
 
Posts: n/a
Default Formula to sum two cell values

the -- signal before is to prevent any errors as you are looking for text
data, tanks for the feedback

regards
Marcelo

"smiths4" escreveu:

Thank you it worked perfectly. Just curious, in the formula what does the --
stand for?

"Marcelo" wrote:

Hi

=sumproduct(--(A2:A7="Doctor")*(c2:c7=1))

hth
regards from Brazil
Marcelo

"smiths4" escreveu:

Good morning all,

I need to find a formula that can give me a total from two different
columns. example...

Column A is Column C is
Doctor 1
Lawyer 2
Lawyer 2
Doctor 1
Lawyer 2
Doctor 2

And as a result I need the formula to tell me how many doctors have a "1"
rating.

Please help.

Thanks
smiths4

  #10   Report Post  
Posted to microsoft.public.excel.misc
smiths4
 
Posts: n/a
Default Formula to sum two cell values

Thank you all for your input.

" wrote:

And as a result I need the formula to tell me how many doctors have a "1"
rating.

As I understand from your question you need to count those Doctors who
have gained "1". Unfortunately, the criteria required to be in 2
different columns.

You can go for this simple solution:
1-Insert a new column between these two columns (I do not know if you
use "B" or not")
2- Concatenat the first column content to the third column content by
using the "&" operator --------- it should look like "doctor1",
"doctor2",...etc
3-use the following formula in any cell :
Countif (Range, "doctor1") {here i search for doctors who has 1}
the formual will count the number of doctors who have "1" only.

4-you can select the inserted column and Hide it.

Hope it works with you and helps.

Hesham Elhadad


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
formula for named cell/range using cell values alex Excel Worksheet Functions 2 August 27th 05 06:44 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM


All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"