Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Catherine
 
Posts: n/a
Default How do I identify the 7th digit in a 13 digit number, then establi

An SA identity number has 13 digits, the 1st 6 digits are your birthday, the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087 is a
male because the middle four digits are above 5000. I do realize that "text
to columns" and a simple if function would suffice, but it is important that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=if(mid(a1,8,4)*1<5000,"Female","Male"))


"Catherine" wrote in message
...
An SA identity number has 13 digits, the 1st 6 digits are your birthday,
the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087
is a
male because the middle four digits are above 5000. I do realize that
"text
to columns" and a simple if function would suffice, but it is important
that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine



  #4   Report Post  
LanceB
 
Posts: n/a
Default

=--MID(A1,7,1) if you just want the 7th digit
=--MID(A1,7,4) if you just want all 4t


"Catherine" wrote:

An SA identity number has 13 digits, the 1st 6 digits are your birthday, the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087 is a
male because the middle four digits are above 5000. I do realize that "text
to columns" and a simple if function would suffice, but it is important that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine

  #5   Report Post  
Bernard Liengme
 
Posts: n/a
Default

Is the id entered as 730825 0137 088 or as ID 730825 0137 088
If the first use: =IF(--MID(A1,8,1)<5,"M","F")
if the second use =IF(--MID(A1,11,1)<5,"M","F")
The double negation converts the text digit to a numeric value.
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Catherine" wrote in message
...
An SA identity number has 13 digits, the 1st 6 digits are your birthday,
the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087
is a
male because the middle four digits are above 5000. I do realize that
"text
to columns" and a simple if function would suffice, but it is important
that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine





  #6   Report Post  
Kassie
 
Posts: n/a
Default

Change the "<" to read "", or else swap the "M" and "F", as <5000 = Female,
and 5000 = Male

"Bernard Liengme" wrote:

Is the id entered as 730825 0137 088 or as ID 730825 0137 088
If the first use: =IF(--MID(A1,8,1)<5,"M","F")
if the second use =IF(--MID(A1,11,1)<5,"M","F")
The double negation converts the text digit to a numeric value.
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Catherine" wrote in message
...
An SA identity number has 13 digits, the 1st 6 digits are your birthday,
the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087
is a
male because the middle four digits are above 5000. I do realize that
"text
to columns" and a simple if function would suffice, but it is important
that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine




  #7   Report Post  
Kassie
 
Posts: n/a
Default

Sorry, but you will then also have to change it to =, because 5 and up
equals male

It should therefore read:

If the first use: =IF(--MID(A1,8,1)<5,"F","M")
if the second use =IF(--MID(A1,11,1)<5,"F","M")

"Bernard Liengme" wrote:

Is the id entered as 730825 0137 088 or as ID 730825 0137 088
If the first use: =IF(--MID(A1,8,1)<5,"M","F")
if the second use =IF(--MID(A1,11,1)<5,"M","F")
The double negation converts the text digit to a numeric value.
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Catherine" wrote in message
...
An SA identity number has 13 digits, the 1st 6 digits are your birthday,
the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087
is a
male because the middle four digits are above 5000. I do realize that
"text
to columns" and a simple if function would suffice, but it is important
that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine




  #8   Report Post  
CLR
 
Posts: n/a
Default

Conditional formatting on your ID column.......

Condition 1, Formula is: =--MID($A1,8,1)<5, format cell background as pink
Condition 2, Formula is: =--MID($A1,8,1)=5, format cell background as blue

Vaya con Dios,
Chuck, CABGx3



"Catherine" wrote:

An SA identity number has 13 digits, the 1st 6 digits are your birthday, the
next 4 digits indicate male or female, I don't know what the last three
indicate. Anyway I wan't to write a formula that will tell me if employees
are male or female based on their ID number. e.g. ID 730825 0137 088 is a
female because the middle four digits are below 5000, ID 730825 5432 087 is a
male because the middle four digits are above 5000. I do realize that "text
to columns" and a simple if function would suffice, but it is important that
the ID number remains in one column. Please help, it would be much
appreciated!
Catherine

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod-10 Check Digit Union70 Excel Worksheet Functions 4 March 8th 05 07:58 AM
Tell users how to sort 5 digit and 9 digit zipcodes correctly aft. [email protected] New Users to Excel 1 February 18th 05 12:59 AM
16 DIGIT NUMBERS IN CELL WITHOUT LAST DIGIT BEING A ZERO jnkell Excel Worksheet Functions 2 December 18th 04 07:13 PM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM
I have a col. with 6 digit nos to convert to 3 cols of 2 digits Brian Excel Discussion (Misc queries) 4 December 3rd 04 09:21 PM


All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"