You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

📰 Apple Fitness+ unveils an exciting lineup of new ways to stay active and mindful in 2025

Offerings include new programs for strength, pickleball, yoga, and breath meditation, and a new collaboration with Strava. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cell's data format in numbers

I'm a part-time investor, investing in Japanese stocks in long terms 3~5 years. When I managed my portfolio in Numbers, I met a few problems and kindly ask your help in Apple Support Communities.


For example, I buy stock code 1997 on 2018/03/26 and sold it on 2021/05/11. So I input a simple formula F4-D4, which get period value at H4. However, data format of Duration only have wk or day, what I need is shown in years. in this case, shown as "3.1y".


So can anyone advise on how I can edit duration in years, but not wk or day?


thank you!

MacBook Pro 13″, macOS 11.3

Posted on May 22, 2021 5:27 PM

Reply
Question marked as Top-ranking reply

Posted on May 22, 2021 7:59 PM

They probably did not do "years" because a "year" varies in length.


You can calculate the difference in years and create a custom format that appends a "y" to the number.


=YEARFRAC(D4,F4,1)

Take a look at the description for the function to choose the last parameter that fits your needs. "1" is for "actual days in each year".




2 replies
Question marked as Top-ranking reply

May 22, 2021 7:59 PM in response to toga86

They probably did not do "years" because a "year" varies in length.


You can calculate the difference in years and create a custom format that appends a "y" to the number.


=YEARFRAC(D4,F4,1)

Take a look at the description for the function to choose the last parameter that fits your needs. "1" is for "actual days in each year".




Cell's data format in numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.