Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Corey
 
Posts: n/a
Default equaton with #'s Y and N

I am adding the sum of c3:c24. Cell C3,C10,C11,C13,C14,C17-
C21 will contain the text "Y" or "N" and will have a +5
or -5 value. How do I create a formula to that will run
this equation? Also, I want to be able to set a variable +
and - on different cells. Ex.(C3 if "Y"+3,C3 if "Y"-5)

=IF(C3="Y",SUM(C4:C24)+5,IF(C3="N",SUM(C4:C24)-5)) is
working but only is looking at C3 how do I continue the
equation?
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

One way:

=SUM(C3:C24,COUNTIF(C3:C24,{"Y","N"})*{5,-5})

HTH
Jason
Atlanta, GA

-----Original Message-----
I am adding the sum of c3:c24. Cell

C3,C10,C11,C13,C14,C17-
C21 will contain the text "Y" or "N" and will have a +5
or -5 value. How do I create a formula to that will run
this equation? Also, I want to be able to set a variable

+
and - on different cells. Ex.(C3 if "Y"+3,C3 if "Y"-5)

=IF(C3="Y",SUM(C4:C24)+5,IF(C3="N",SUM(C4:C24)-5)) is
working but only is looking at C3 how do I continue the
equation?
.

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 04:58 AM.

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"