+ Reply to Thread
Results 1 to 14 of 14

SORRY - A function needed to derive *** from a social security number

  1. #1
    Registered User
    Join Date
    02-07-2013
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Unhappy SORRY - A function needed to derive *** from a social security number

    Sorry in andvance for flooding your forum with a thread that's propably way out of place.

    I must also note that I am a total newbie in terms of using Excel, yet I have been given the duty of helping a wide variety of people with it's use.

    Now to the subject itself, the Finnish social security number consists of 11 digits, one being the dash separating the first 6 and last 4 digits.

    123456-9876 for example

    The first six digits define age (ddmmyy), and the first three of the last four digits define GENDER FOR CHRISTSSAKE (even being female and odds being male).

    All of this information is going to be placed in a single cell, and I would need a function that can pick those first three digits from the last four number cluster, divide that number and see whether it's a he or a she.

    Can someone please help me out?
    Last edited by Slav3; 02-07-2013 at 06:32 AM. Reason: hitler

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: SORRY - A function needed to derive *** from a social security number

    With the SSN in cell A1 then something like this, maybe:

    =IF(ISEVEN(VALUE(MID(A1,FIND("-",A1)+1,3))),"Female","Male")

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

    Re: SORRY - A function needed to derive *** from a social security number

    try
    =IF(ISEVEN(--MID(A1,FIND("-",A1)+1,3)),"female","male")
    well that's the same then lol
    "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

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: SORRY - A function needed to derive *** from a social security number

    Hi Slav3

    Try the following assuming the Security number is in A1
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Edit: Swap the male & female around, just looked at the post again!
    Last edited by Kevin UK; 02-07-2013 at 06:41 AM.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

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

    Re: SORRY - A function needed to derive *** from a social security number

    3's a charm

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: SORRY - A function needed to derive *** from a social security number

    Well, just for a change, how about pointlessly complicated

    =PROPER(LEFT("fe",2*(1-MOD(INT(SUBSTITUTE(A1,"-","")/10),2))) & "male")

  7. #7
    Registered User
    Join Date
    02-07-2013
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: SORRY - A function needed to derive *** from a social security number

    Well as I said I am as completely useless with Excel as those that I am helping.

    For example, when I paste the function into the function-field, it gives me a pop-up saying there's an error in the function and tries to direct me to Ms's own help.
    It's hard to even describe how frustrating this is, I can't even modify the function so that it would apply to all the cells in column A.

    Thanks a bunch to ya'll, making my day look like I'm actually doing something worthwhile.

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

    Re: SORRY - A function needed to derive *** from a social security number

    mind you since they are all the same length

    =IF(ISEVEN(MID(A1,10,1)),"female","male")

  9. #9
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: SORRY - A function needed to derive *** from a social security number

    The local settings on your Excel might use semi-colons, rather than commas, as separators in functions, so try:

    =IF(ISEVEN(VALUE(MID(A1;FIND("-";A1)+1;3)));"Female","Male")

    All of these functions also rely on the SSN being in cell A1. If it's in a different cell then you'll have to change all of the A1 references to that cell address.

  10. #10
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: SORRY - A function needed to derive *** from a social security number

    I've just noticed the title of this thread.

    Have we got the world's most prudish censor-bot, or what? You can have a gender, but you can't have ***.

    Where does it think little censor-bots come from?

  11. #11
    Registered User
    Join Date
    02-07-2013
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: SORRY - A function needed to derive *** from a social security number

    I think I may have managed to narrow down the error in my case, after closing the pop-up, a part of the function becomes highlighted, in this case "Female","Male". Doesn't matter whether I use the function you gave last or the one in post # 3

  12. #12
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: SORRY - A function needed to derive *** from a social security number

    I think we're nearly there - I just forgot to replace the last comma with a semi-colon:

    =IF(ISEVEN(VALUE(MID(A1;FIND("-";A1)+1;3)));"Female";"Male")

    Or you could use Martin's formula, which is a lot shorter:

    =IF(ISEVEN(MID(A1;10;1));"female";"male")

  13. #13
    Registered User
    Join Date
    02-07-2013
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Thumbs up Re: SORRY - A function needed to derive *** from a social security number

    =IF(ISEVEN(VALUE(MID(A1;8;3)));"female";"male")

    Hi, I just thought to let ya'll know that I found a solution thanks to your help. I don't find it likely I'd have found out the MID function by myself.

    A very handy site, I'll be returning for more advice in the future.

  14. #14
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: SORRY - A function needed to derive *** from a social security number

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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