Closed Thread
Results 1 to 9 of 9

Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding year

  1. #1
    Registered User
    Join Date
    09-18-2019
    Location
    Alberta, Canada
    MS-Off Ver
    Microsoft Excel for Mac Version 15.26
    Posts
    3

    Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding year

    Hello,

    I'm trying to figure out what formula/function to use to determine a person's chinese zodiac animal if their birth year corresponds with the year for that given animal. I'm still relatively new to excel. I've explored VLOOKUP, MATCH, and INDEX, but none of these seem to work. If you have any ideas I would be most appreciative. I'll attach my excel worksheet to this post of how far I've gotten. All birth years are fictitious.

    Thanks in advance,

    Rory
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    In D3:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In E3:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy down.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    Option without the table:

    For Chinese Animal Zodiac, put this on D3 and copied down:

    =IF(A3="","",INDEX({"Rat","Ox","Tiger","Rabbit","Dragon","Snake","Horse","Goat","Monkey","Rosster","Dog","Pig"},MATCH(MOD((YEAR(A3)-4),12),({0,1,2,3,4,5,6,7,8,9,10,11}),0)))

    For Personality, put this on E3 and copied down:

    =IFERROR(INDEX({"Quick-witted, resourceful, versatile, kind","Diligent, dependable, strong, determined","Brave, confident, competitive","Quiet, elegant, kind, responsible","Confident, intelligent, enthusiastic","Enigmatic, intelligent, wise","Animated, active, energetic","Calm, gentle, sympathetic","Sharp, smart, curiosity","Observant, hardworking, courageous","Lovely, honest, prudent","Compassionate, generous, diligent"},MATCH(D3,{"Rat","Ox","Tiger","Rabbit","Dragon","Snake","Horse","Goat","Monkey","Rooster","Dog","Pig"},0)),"")
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-18-2019
    Location
    Alberta, Canada
    MS-Off Ver
    Microsoft Excel for Mac Version 15.26
    Posts
    3

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    Amazing! My mind is offically blown...

    Thanks Olly!

  5. #5
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    Or..................

    [D3] =LOOKUP(1,-FIND(YEAR($A3),'Chinese Zodiac Years'!$B$23:$B$34),'Chinese Zodiac Years'!A$23:A$34)

    [E3] =LOOKUP(1,-FIND(YEAR($A3),'Chinese Zodiac Years'!$B$23:$B$34),'Chinese Zodiac Years'!C$23:C$34)

    All copied down

    Regards
    Bosco

  6. #6
    Registered User
    Join Date
    09-18-2019
    Location
    Alberta, Canada
    MS-Off Ver
    Microsoft Excel for Mac Version 15.26
    Posts
    3

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    Awesome, Thank you Azumi!

  7. #7
    Registered User
    Join Date
    05-25-2020
    Location
    UK
    MS-Off Ver
    2010
    Posts
    1

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    I'm looking into this, but can't download the excel file - can anyone help with posting the completed workbook?

  8. #8
    Registered User
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    87

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    I don't think the result will be accurate, I too wanted a formula to return a Chinese Zodiac animal base on a date, but one thing causes a big headache. Chinese calendar is different to a Gregorian calendar, so it will be dicrepancies if someone born between 21st Jan & 20th Feb. They are different every year. Some start as early as 21st January and some as late as 20th February. For example, if someone born 1st Feb 1984, using the above formulas will output "Rat", but year of "rat" starts on 10th Feb 1984 & ends 19th Feb 1985 and therefore the correct result should be "pig". I wonder if this can be hard coded in a formula rather than having to use the table. Thanks!
    Attached Files Attached Files

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,767

    Re: Trying to output a Chinese Zodiac Animal if the Birth Year matches the corresponding y

    Administrative Note:

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Get names according year of birth
    By Immortal2014 in forum Excel General
    Replies: 3
    Last Post: 09-16-2017, 01:35 PM
  2. generating year of birth based on date and age
    By isawalha in forum Excel General
    Replies: 6
    Last Post: 06-29-2016, 07:07 AM
  3. Replies: 3
    Last Post: 10-06-2015, 05:30 PM
  4. Replies: 1
    Last Post: 04-22-2015, 08:08 AM
  5. [SOLVED] Need help in sorting date of birth irrespective of year
    By SMILE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-07-2013, 06:05 AM
  6. Need help in adjusting date of birth year
    By ChetForce in forum Excel General
    Replies: 5
    Last Post: 05-08-2012, 11:15 AM
  7. Excel 2007 : zodiac sign with birth date
    By ewqewq in forum Excel General
    Replies: 2
    Last Post: 01-17-2010, 06:56 AM

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