+ Reply to Thread
Results 1 to 3 of 3

Assigning unique values to "yes" or "no"

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    California
    MS-Off Ver
    2007
    Posts
    1

    Assigning unique values to "yes" or "no"

    Hi first post here. I am having trouble coming up with a good function for my needs.

    I have survey data where every 5th column (ie. 1E, 1J, 1O, etc) there is a "yes" or "no." I want to sum each row for these such as 1E+1J+1O BUT, "yes" in column 1E has a different value then a "yes" for 1J.

    How would I go about adding up these columns, but the "yes" generate a unique value. For example if a yes in 1E = 1.5 and a yes in 1J = .25, my formula would generate 1.75 by simply using "yes" as reference?

    Any help is appreciated

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Assigning unique values to "yes" or "no"

    How do you identify the different values of each yes?

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Assigning unique values to "yes" or "no"

    First of all, welcome to the forum.


    You should get in the habbit of stating cell references in Column/Row format, for example A6, of F12. This is the format Excel uses, as well as anyone who works within excel


    Without seeing the data, you could try something like this

    =SUM(IF(E1="yes",1.5,0),IF(J1="yes",0.25,0),IF(O1="yes",0.1,0))

    Red is the values to 'assign', you didn't specify what a value in O1 would be so I guessed .1 If you want to make a value for No as well, just change the Zeros right after the Red text within each IF statement.

    To break that down a bit,


    =SUM( IF(E1="yes",1.5,0) , IF(J1="yes",0.25,0) , IF(O1="yes",0.1,0) )


    I am getting a SUM. =SUM will sum up all of the values placed in it, separated by commas. In this case I have three different IF formulas seperated by commas

    IF(E1="yes",1.5,0)

    IF(J1="yes",0.25,0)

    IF(O1="yes",0.1,0)

    So, if it is yes yes no, the SUM formula see the following, =SUM(1.5,.25,0) which totals 1.75

    IF function works by if(logical_test, value_if_true, value_if_false)

    Hope this helps.
    Last edited by Speshul; 10-14-2014 at 01:26 PM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 11-22-2013, 01:36 PM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. Replies: 0
    Last Post: 01-09-2013, 06:52 PM
  4. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  5. Replies: 1
    Last Post: 07-16-2010, 02:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1