• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

When will the sum of 2 fields be >= 90 if they increase by 1 every year?|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / When will the sum of 2 fields be >= 90 if they increase by 1 every year?|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…When will the sum of 2 fields be &g…
sp_PrintTopic sp_TopicIcon
When will the sum of 2 fields be >= 90 if they increase by 1 every year?
Avatar
Kathi Mills

New Member
Members
Level 0
Forum Posts: 2
Member Since:
March 21, 2020
sp_UserOfflineSmall Offline
1
October 28, 2022 - 9:26 am
sp_Permalink sp_Print

I have a list of employees that includes their HireDate and DateOfBirth from which I have calculated their Age and YearsOfService on a specified date in the future (8/1/2023).  From this data I need to run an analysis to determine how many years it will be before the Age + YearsOfService >= 90 assuming each field increases by 1 year on the yearly anniversary of the specified date.

For example if current YearsOfService = 11 and Age = 30 then current sum is 41.  Next year it will be 12 + 31 = 43, the following year will be 13 + 32 = 45, etc.  I can figure it out on an employee-by-employee basis on a separate worksheet using SEQUENCE() function for each and summing each row, but there are over 600 employees to go through.

Further, I am trying to categorize the results to identify those employees that will reach the magic sum of 90 within "0 to <1 yr", "1 to <2 yrs", "2 to < 5yrs" and "5+ yrs".  I think that should make my analysis easier, just can't figure out how ;(

I am open to any solutions but if you choose to help this info may be useful:  I am pretty experienced with PQ (perhaps a GroupBy solution?), somewhat less with VBA if it involves looping and tables together, and feel really good with formulas.  I just can't figure out how to easily accomplish what I'm trying to do. Sadly, PBI is not an option with this client and it has to ALL be done in Excel 365.

Any input/advice will be so very much appreciated.  

sp_AnswersTopicSeeAnswer See Answer
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
October 28, 2022 - 12:46 pm
sp_Permalink sp_Print

Hi Kathi,

You can work out how many years until a person reaches 90 with this formula

=IF((90-(B3+C3))<0,0,ROUNDUP((90-(B3+C3))/2,0))

aging formulaImage Enlarger

 

and you can then use a lookup table to classify them into groups

=VLOOKUP(D3,$G$3:$H$6,2,TRUE)

lookup of aging groupImage Enlarger

 

I've done this in Excel using formulae but it is as easily done in Power Query.

Regards

Phil

sp_AnswersTopicAnswer
Answers Post
Avatar
Kathi Mills

New Member
Members
Level 0
Forum Posts: 2
Member Since:
March 21, 2020
sp_UserOfflineSmall Offline
3
October 28, 2022 - 1:15 pm
sp_Permalink sp_Print

Genius!  Thank you so, so much Philip.  I was very much over-complicating things.  Now that I've seen your solution I feel a little silly.  Thanks for taking the time to help me 🙂

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
November 14, 2022 - 10:35 am
sp_Permalink sp_Print

No worries Kathi, glad to help.

Regards

Phil

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Ruth Savage, Andy Kirby, Roy Lutke, Jeff Krueger
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31889
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.