Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / September 2007

Tip: Looking for answers? Try searching our database.

Sum up results from If statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kelly - 25 Sep 2007 14:14 GMT
    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!!
Pete_UK - 25 Sep 2007 14:25 GMT
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

>         Result
> 1       Red
[quoted text clipped - 16 lines]
>
> Thanks!!
PCLIVE - 25 Sep 2007 16:03 GMT
Not sure exactly what you're trying to do, but maybe something like this:

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

HTH,
Paul

> Result
> 1 Red
[quoted text clipped - 18 lines]
>
> Thanks!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.