+ Reply to Thread
Results 1 to 8 of 8

Automatically adding Mr or Ms to male/female

  1. #1
    Registered User
    Join Date
    04-28-2008
    Posts
    23

    Automatically adding Mr or Ms to male/female

    I have a list of data some with people titles, others with it missing. what i plan on doing is

    D is the collum for title some are entered others are not. collum G has male and female already filled in.

    is there a code to say if D is empty then look at G if it is female enter Ms in collum D and if male enter Mr in collum D.

    Thanks

  2. #2
    Registered User
    Join Date
    04-29-2008
    Location
    Oxfordshire, England
    MS-Off Ver
    Excel 2010
    Posts
    16
    Quote Originally Posted by TTej
    I have a list of data some with people titles, others with it missing. what i plan on doing is

    D is the collum for title some are entered others are not. collum G has male and female already filled in.

    is there a code to say if D is empty then look at G if it is female enter Ms in collum D and if male enter Mr in collum D.

    Thanks
    Not sure about how you say if a cell is blank to do this, but just sort the data so all the empty titles cells are at the top then put this formula in column D:

    =IF(G1="male","Mr","Ms")

    THIS IS ASSUMING THAT G ONLY CONTAINS 'male' or 'female' Otherwise this code will put Mr for 'male' and Female for anything else (e.g. if male had been mistyped)

    Hope this helps,

    Tim.
    Last edited by Timja; 04-29-2008 at 05:36 AM.

  3. #3
    Registered User
    Join Date
    04-28-2008
    Posts
    23
    thanks for the code part. unfortunatly i cannot arrange the empty (blank) cells at the top as the sheet is being used for calucations.

    can i not use a IF statement.

    IF an empty/black cell is found then use the formula, if the cell has any information move down tot he next row?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    i dont see a problem put the formula in the first cell in col d in the row that data starts
    so say first row is 5 change formula to match row
    =IF(G5="male","Mr","Ms")
    then drag down it will just over write whats there
    so if d20 already had Mr in it it would just be replaced by Mr anyway
    once done select all data in row d /copy paste back as special/values to remove formulas.

  5. #5
    Registered User
    Join Date
    01-12-2013
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Automatically adding Mr or Ms to male/female

    Hi!

    How about this?

    =if(a4="mr.","male","")&if(a4="mrs.","female","")

    vishal vodro.

  6. #6
    Registered User
    Join Date
    10-03-2017
    Location
    Lagos
    MS-Off Ver
    MS Office 2016
    Posts
    1

    Re: Automatically adding Mr or Ms to male/female

    Thanks Vishal

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Automatically adding Mr or Ms to male/female

    =if(a4="";"";if(a4="mr.","male",if(a4="mrs.","female","unknown")))
    Or mayb this
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  8. #8
    Registered User
    Join Date
    01-12-2013
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    2
    Good to see this post still alive even after 4 years... Cheers...

+ 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