Consulting

Results 1 to 4 of 4

Thread: Non Mathematica forumlar for creating a list of names

  1. #1

    Non Mathematica forumlar for creating a list of names

    This database is really just an extensive record of information about individuals and couples. A row can contain information on 1 person, a couple with the same last name, and couples with different last names. I am hoping to be able to use the current database without creating another worksheet for this purpose. Column F is FirstName1; Column G is LastName1; Column J is FirstName2; Column I is LastName2.

    Since I must select only certain individuals or couples, I created another column with the value of 1 if there in only a single inividual, 2 if there is a couple with the same last name, 3 if the couple has different last names, and 4 if name of the single selected individual for that row is in Column J & I.

    I haven't got a clue what I am doing.

    Dreamboat created this formula.It works great, and until now, I have found "successful" ways to adapt it. Dreamboat's formula:
    =IF(ISBLANK(J2),F2&" "&G2,IF(J2=G2,F2&"and"&I2&" "&J2,F2&" "&G2&"and"&I1&" "&J2))

    Her formula determines if there are two people listed in a row;If J2 is blank, then the next steps output the name of a single indifidual, If J2 is not blank and is equal to G2, then the couple shares the same last name and is output in that format, otherwise, if the last names are different, the final format is used.

    In order to pick the names I needed, I made a separate column in which I entered a 1 if there was a single indiviual in the row, a 2 if a couple had the same last name, and a 3 if a couple had different last name. In some instances, when two individuals appeared in a row, the name needed was in the second pair of columns. For this circumstance, I selected 4 as the key.

    This is the last of my attempts. I don't even get error messages! It just doesn't do anything. =IF(ISNOTBLANK(E2),IF(E2=1,F2&" "&G2),IF(E2=2,F2&"and"&J2&" "&J2),IF(E2=3,F2&" "&G2&"and"&I2&" "&J2),IF(E2=4,I2&" "&J2)).


    I have tried not using the isnotblank statement, as I don't know if such a thing exists. I even simplified it to test to see if it would output a single name if the condition was true ---- Nothing happened.<img>


    I AM LOST! I don't know beans about formulas but read that it was possible to do nested if statements. I don't know if one needs to write EndIf, or something of that sort at the end of it.


    Please help, if you can. Thanks so much, Trudy<img>

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =IF(ISBLANK(E2),"",IF(E2=1,F2&" "&G2,IF(E2=2,F2&" and "&I2&" "&J2,IF(E2=3,F2&" "&G2&" and "&I2&" "&J2,IF(E2=4,I2&" "&J2)))))

  3. #3
    Quote Originally Posted by xld
    =IF(ISBLANK(E2),"",IF(E2=1,F2&" "&G2,IF(E2=2,F2&" and "&I2&" "&J2,IF(E2=3,F2&" "&G2&" and "&I2&" "&J2,IF(E2=4,I2&" "&J2)))))
    I must admit I was very excited to see this, but I get the same result. No error message, but not output.<img>

    Thank you so much for taking time to try to help.<img>

    Trudy

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by trudymcd
    I must admit I was very excited to see this, but I get the same result. No error message, but not output.<img>

    Thank you so much for taking time to try to help.<img>

    Trudy
    Well it works for me. See attached

Posting Permissions

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