Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Corey
 
Posts: n/a
Default Values for Y and N in multiple cells

I
am adding up C2:C7, but I want to stay within the same row
when converting the "Y" or "N" to the value I set for it.
In other words this is how I want it to work...

C2 Y (value I set in formula = +1)
C3 3
C4 N (value I set in formula = -2)
C5 10
C6 Y (value I set in formula = +3)
C7 2
C8 17 (Total)

Any Ideas?

Corey

  #2   Report Post  
Nick B
 
Posts: n/a
Default

Can you give a longer example?
IF C2 = Y, C3 = 3, C4 = N, C5 = 10, C6 = Y, C7 = 2 and
D1 = should return 1, D2 should return 3, D3 should return -2, D4 should
return -2, D5 should reutnr 10, D6 should return 3, and D7 should return 2 and
D2 and D6 return + since they Y and D4 returns - since it is a N and
D2 = 1 since it is the first letter and D4 returns 2 since it is the second
letter and D6 returns 3 since it is the third letter, then you could use the
formula:
=IF(ISNUMBER(C2),C2,IF(C2="N",-(COUNTIF(C$2:C2,"Y")+COUNTIF(C$2:C2,"N")),COUNTIF( C$2:C2,"Y")+COUNTIF(C$2:C2,"N")))
in D2 and drag it down to D6.

"Corey" wrote:

I
am adding up C2:C7, but I want to stay within the same row
when converting the "Y" or "N" to the value I set for it.
In other words this is how I want it to work...

C2 Y (value I set in formula = +1)
C3 3
C4 N (value I set in formula = -2)
C5 10
C6 Y (value I set in formula = +3)
C7 2
C8 17 (Total)

Any Ideas?

Corey


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
How do I sum up values only in cells that are color filled? TryingExcel Excel Worksheet Functions 7 April 12th 09 03:34 PM
How to sum values in multiple worksheets Robert Lawrence Excel Worksheet Functions 3 January 29th 05 05:15 AM
Multiple X-Axis Values Rob Herrmann Charts and Charting in Excel 2 January 23rd 05 10:57 PM
Adding multiple cells, return specific values Jim Excel Worksheet Functions 4 December 8th 04 07:26 AM
Counting "rows", i.e. simultaneous criteria for multiple cells gkline Excel Worksheet Functions 2 November 19th 04 07:30 AM


All times are GMT +1. The time now is 11:05 AM.

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"