Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default if, and, then formula

I'm trying to make a formula such that if a column has alphabetical digits
[E,I, M,P,...] and the column beside it has numerical digits [5, 6, 8...], I
can relate the number of times I matches with 6. I cannot do just a simple
countif and subtraction formula as sometimes the 6 matches with E. I tried:
=if(E21:e25,"I")and(D21:d25,"6")then(countif(e21:e 25,"I")) but that only
results in an error. However, that might give an idea of what I'm looking
for.
Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default if, and, then formula

=Sumproduct(--(E21:E25)="E"),--(D21:D25=6))

"Booklover32" wrote:

I'm trying to make a formula such that if a column has alphabetical digits
[E,I, M,P,...] and the column beside it has numerical digits [5, 6, 8...], I
can relate the number of times I matches with 6. I cannot do just a simple
countif and subtraction formula as sometimes the 6 matches with E. I tried:
=if(E21:e25,"I")and(D21:d25,"6")then(countif(e21:e 25,"I")) but that only
results in an error. However, that might give an idea of what I'm looking
for.
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default if, and, then formula

Should be...

=Sumproduct(--(E21:E25="E"),--(D21:D25=6))


"Toppers" wrote:

=Sumproduct(--(E21:E25)="E"),--(D21:D25=6))

"Booklover32" wrote:

I'm trying to make a formula such that if a column has alphabetical digits
[E,I, M,P,...] and the column beside it has numerical digits [5, 6, 8...], I
can relate the number of times I matches with 6. I cannot do just a simple
countif and subtraction formula as sometimes the 6 matches with E. I tried:
=if(E21:e25,"I")and(D21:d25,"6")then(countif(e21:e 25,"I")) but that only
results in an error. However, that might give an idea of what I'm looking
for.
Thanks!

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



All times are GMT +1. The time now is 11:28 PM.

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

About Us

"It's about Microsoft Excel"