Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Robb27
 
Posts: n/a
Default adding if statement results

I am trying to build a sheet that brings certain values to playing card
values. Example: A deck of playing cards, 2's through 6's = +1. 7's, 8's and
9's have 0 value and 10's and Aces (A) have a value of -1.

I have an IF formula so that when any of these cards 2-Ace (A) is inserted
in a cell, then it returns its appropriate value. It looks like this:

=IF(A2=7,"0",IF(A2=9,"0",IF(A2=8,"0",IF(A2=2,"1",I F(A2=3,"1",IF(A2=4,"1",IF(A2=5,"1",IF(A2=A10,"-1"))))))))

Now, in cell K1, I want to sum the row of newly aquired values (either +1,
-1, or a 0) and I can't get it to work. It won't add the row with =sum

Thanks for your expertise,

Robb
  #2   Report Post  
duane
 
Posts: n/a
Default


your if statement is resulting in text so sum will result in error

i suggest taking the "'s out of the formula

=IF(A2=7,"0",IF(A2=9,"0",IF(A2=8,"0",IF(A2=2,"1",I F(A2=3,"1",IF(A2=4,"1",IF(A2=5,"1",IF(A2=A10,"-1"))))))))

also note that the last if statement does not have a result for a2 not
equal to a10

you are also missing test for a2=6 I think

probably much simpler to do via a lookup table - set possible values
for a2 in column1 and desired value in column2 and do a vlookup


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=318971

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

You can shorten that formula to:

=IF(A2="","",IF(A2<=6,1,IF(A2<=9,0,-1)))

When you say that =SUM doesn't work, exactly what doesn't
work? What are you trying to sum? Are you getting error
messages?

Biff

-----Original Message-----
I am trying to build a sheet that brings certain values

to playing card
values. Example: A deck of playing cards, 2's through 6's

= +1. 7's, 8's and
9's have 0 value and 10's and Aces (A) have a value of -

1.

I have an IF formula so that when any of these cards 2-

Ace (A) is inserted
in a cell, then it returns its appropriate value. It

looks like this:

=IF(A2=7,"0",IF(A2=9,"0",IF(A2=8,"0",IF(A2=2,"1", IF

(A2=3,"1",IF(A2=4,"1",IF(A2=5,"1",IF(A2=A10,"-1"))))))))

Now, in cell K1, I want to sum the row of newly aquired

values (either +1,
-1, or a 0) and I can't get it to work. It won't add the

row with =sum

Thanks for your expertise,

Robb
.

  #4   Report Post  
Biff
 
Posts: n/a
Default

P.S.

I just noticed why your sum won't work:

In your formula you have the " " around the numeric
values. Excel treats those values as TEXT, not numeric
numbers. Leave out the quotes and it should be ok but you
should still use the shorter formula I offered.

Biff

-----Original Message-----
I am trying to build a sheet that brings certain values

to playing card
values. Example: A deck of playing cards, 2's through 6's

= +1. 7's, 8's and
9's have 0 value and 10's and Aces (A) have a value of -

1.

I have an IF formula so that when any of these cards 2-

Ace (A) is inserted
in a cell, then it returns its appropriate value. It

looks like this:

=IF(A2=7,"0",IF(A2=9,"0",IF(A2=8,"0",IF(A2=2,"1", IF

(A2=3,"1",IF(A2=4,"1",IF(A2=5,"1",IF(A2=A10,"-1"))))))))

Now, in cell K1, I want to sum the row of newly aquired

values (either +1,
-1, or a 0) and I can't get it to work. It won't add the

row with =sum

Thanks for your expertise,

Robb
.

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
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 08:11 AM
Banding Results Ben Hur Excel Discussion (Misc queries) 2 December 3rd 04 10:19 PM
?odd results for =left(F#,2) Steven Stadelhofer Excel Worksheet Functions 1 November 4th 04 09:54 PM
Duplicate fields does not match up! If statement Patsy Excel Worksheet Functions 0 November 3rd 04 03:53 PM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


All times are GMT +1. The time now is 09:24 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"