PDA

View Full Version : Non Mathematica forumlar for creating a list of names



trudymcd
04-19-2006, 12:57 AM
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>

Bob Phillips
04-19-2006, 02:46 AM
=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)))))

trudymcd
04-19-2006, 05:28 AM
=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

Bob Phillips
04-19-2006, 05:53 AM
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