+ Reply to Thread
Results 1 to 8 of 8

If any of these cells have text in them put a comma, if there is no text then a comma

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    66

    Question If any of these cells have text in them put a comma, if there is no text then a comma

    I have an extremely long formula and I need to list the family members like so.

    Person lives with PARENT 1 CELL (PARENT1 NAME CELL, PARENT1 AGE CELL)

    Then it gets trickier because there are 4 more sets (relation, name, age) to account for other family members. If ANY of these cells have information in them there should be a comma afterwards [i.e., (PARENT1 NAME CELL, PARENT1 AGE CELL), ]. If NONE of these cells have any information in them there should be a period.

    &IF('Qualtrics Output'!BD3, 'Qualtrics Output'!BG3, 'Qualtrics Output'!BJ3, 'Qualtrics Output'!BM3="",”.”,”,”) is not how to do it...
    All the referenced cells are names btw.
    Last edited by sharpmel; 12-06-2012 at 01:43 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    post a sample workbook showing various results you expect
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-27-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    PAT Automated Scoring and Report_Draft 11 29 12.xlsx
    See worksheet 3 titled Report Draft. Highlighted Row 20.

    I need to have the comma/period and age conditional basically.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    not sure where you want periods,the formula looks to be working as it is

  5. #5
    Registered User
    Join Date
    11-27-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    The commas and the age in between the family members listed. If there are 4 family members it will show up Person (name, age), Person2 (name, age), Person3 (name, age), Person4 (name, age), (age ) , (age ).

    I need the static text to be conditional like an IF statement but I don't know how to set it up.

  6. #6
    Registered User
    Join Date
    11-27-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    So something based on an IF OR statement. If any of the cells having =IF(OR(B1>100,B2>100,B3>100),”Over Budget”,”Acceptable”)

    How do you say if a cell has ANY text in it? IsText?
    Last edited by sharpmel; 12-06-2012 at 10:05 AM.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    2 ways
    if(a1<>"",
    or if(istext(a1),

  8. #8
    Registered User
    Join Date
    11-27-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: If any of these cells have text in them put a comma, if there is no text then a comma

    Thanks

    IF(OR(ISTEXT('Qualtrics Output'!BA3),ISTEXT('Qualtrics Output'!BD3), ISTEXT('Qualtrics Output'!BG3), ISTEXT('Qualtrics Output'!BJ3), ISTEXT('Qualtrics Output'!BM3))," , ", ".")

    solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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