Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default Sum up results from If statement

Result
1 Red
2 White
3 Red
4 Pearl
5 Green
6 Blue
7 Blue
8 Blue

Score -

Not sure how to do this -- I want to score colors. If 1 is Red, then add a
point. If 2 is Orange, add a point. If 3 is Red, add a point, etc. I
thought I could use an If function but I can't get it to work.

Doesn't an if function work like =if(B1=Red,1,0)? I want the score for all
8 colors to be added up. Does that make sense?

Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sum up results from If statement

If the different colours represent different scores then you can use a
lookup table, starting in say cell M1:

Red 1
White 6
Pearl 5
Green 3
Orange 2
Blue 4

Put your scores in the next column as shown. Then in B1 (assuming your
colours are in A1), put this formula:

=VLOOKUP(A1,M$1:N$6,2,0)

and copy down.

Hope this helps.

Pete

On Sep 25, 2:14 pm, Kelly wrote:
Result
1 Red
2 White
3 Red
4 Pearl
5 Green
6 Blue
7 Blue
8 Blue

Score -

Not sure how to do this -- I want to score colors. If 1 is Red, then add a
point. If 2 is Orange, add a point. If 3 is Red, add a point, etc. I
thought I could use an If function but I can't get it to work.

Doesn't an if function work like =if(B1=Red,1,0)? I want the score for all
8 colors to be added up. Does that make sense?

Thanks!!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Sum up results from If statement

Not sure exactly what you're trying to do, but maybe something like this:

=COUNTIF(M1:M8,"Red")
=COUNTIF(M1:M8,"Orange")

HTH,
Paul


--

"Kelly" wrote in message
...
Result
1 Red
2 White
3 Red
4 Pearl
5 Green
6 Blue
7 Blue
8 Blue

Score -

Not sure how to do this -- I want to score colors. If 1 is Red, then add
a
point. If 2 is Orange, add a point. If 3 is Red, add a point, etc. I
thought I could use an If function but I can't get it to work.

Doesn't an if function work like =if(B1=Red,1,0)? I want the score for
all
8 colors to be added up. Does that make sense?

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you display IF statement results in a different cell Neall Excel Worksheet Functions 7 June 22nd 07 08:53 PM
IF statement colored results matles007 Excel Worksheet Functions 1 May 18th 06 02:29 PM
if/then statement that results in Yes/No Patty via OfficeKB.com Excel Discussion (Misc queries) 3 August 3rd 05 02:26 PM
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 08:11 AM
adding if statement results Robb27 Excel Worksheet Functions 3 November 20th 04 05:27 AM


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