+ Reply to Thread
Results 1 to 8 of 8

Formula to Use Named Ranges

  1. #1
    Registered User
    Join Date
    04-29-2021
    Location
    NC,USA
    MS-Off Ver
    2016
    Posts
    3

    Formula to Use Named Ranges

    I am trying to help my son with some homework that is requiring us to create some formulas using named ranges to determine an employees time since starting. The statement in the project guide says "Create a formula using the name ranges that adds the total number of years (to two decimal places) for each teacher and administrator based on their hire date." If I use the following formula I get the correct answer:

    =IF(Admin_Salaries,ROUND(DAYS(TODAY(),C2)/365.25,2), "")& " Years"

    This only gives me the answer for the named range of Admin Salaries, I need the formula to also give the answer if the named range is Teacher_Salaries. I tried this but I cannot get it to work:

    =IF(OR(Admin_Salaries,Teacher_Salaries), ROUND(DAYS(TODAY(),C2)/365.25,2), ""))& " Years"

    I've attached the project guide.
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Formula to Use Named Ranges

    Hi, welcome to the forum
    You should use join for both named ranges, the OR function has no use here and ... I wonder why they want the named ranges since it looks that they're all in the same column
    I've downloaded the file and read what they're actually asking, no promises though
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    04-29-2021
    Location
    NC,USA
    MS-Off Ver
    2016
    Posts
    3

    Re: Formula to Use Named Ranges

    Thanks for taking a look. I figured I could use the OR so if the criteria matched either of the two named ranges it would calculate the years and place the answer in column F otherwise it wouldn't. Could I use VLOOKUP?

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Formula to Use Named Ranges

    I think it's great that you're helping your son with some homework, but it's a lot to really ask here for help.
    It's like cheating for an exam
    I had to think about which formulas to use and how to use them and did come up with an idea and I think the solution.
    I'll give you the three formulas I used, one for each column, E, F and one for G; this way its not all doen by one us and your son can complete it.
    I'm sure others will have other ideas but I liked this one and ... I think the result is what you needed:

    Formula for D 2
    Please Login or Register  to view this content.
    The iedea is that IFEEROR function when correct returns the result, when not it gives a 0 and that I dit for the three named ragnes in one formula, so one will alwyas return the correct answer and that is why I added the result, one will be a correct number and the other two will be 0

    Formula for F 2
    Please Login or Register  to view this content.
    The same principle

    Formula for G 2
    Please Login or Register  to view this content.
    And the final result(proof of result)
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    04-29-2021
    Location
    NC,USA
    MS-Off Ver
    2016
    Posts
    3

    Re: Formula to Use Named Ranges

    Quote Originally Posted by Keebellah View Post
    I think it's great that you're helping your son with some homework, but it's a lot to really ask here for help.
    It's like cheating for an exam
    I had to think about which formulas to use and how to use them and did come up with an idea and I think the solution.
    I'll give you the three formulas I used, one for each column, E, F and one for G; this way its not all doen by one us and your son can complete it.
    I'm sure others will have other ideas but I liked this one and ... I think the result is what you needed:

    Formula for D 2
    Please Login or Register  to view this content.
    The iedea is that IFEEROR function when correct returns the result, when not it gives a 0 and that I dit for the three named ragnes in one formula, so one will alwyas return the correct answer and that is why I added the result, one will be a correct number and the other two will be 0

    Formula for F 2
    Please Login or Register  to view this content.
    The same principle

    Formula for G 2
    Please Login or Register  to view this content.
    And the final result(proof of result)
    Normally I would be inclined to agree with you but we worked on this for 4 days before emailing the teacher for some guidance over 2 weeks ago (He's doing virtual school). The silence is so deafening the crickets sound like a symphony. It's due next week.

    Thanks for the help

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Formula to Use Named Ranges

    You're welcome, glad to have helped anyway, we started from scratch too and needed all the help we could get.
    Just one point when answering, just click replay and not reply with quote.
    Hope your son gets an A

  7. #7
    Registered User
    Join Date
    06-05-2021
    Location
    Pittsburgh,PA
    MS-Off Ver
    Excel 2016
    Posts
    1
    Quote Originally Posted by usedcarTA View Post
    Normally I would be inclined to agree with you but we worked on this for 4 days before emailing the teacher for some guidance over 2 weeks ago (He's doing virtual school). The silence is so deafening the crickets sound like a symphony. It's due next week.

    Thanks for the help
    I agree this online schooling stinks. They watch videos of a random guy. It shows you nothing. I am tring to help my son too ,but am failing miserably.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Formula to Use Named Ranges

    @Pasmith523,

    Please don't quote whole posts -- it's just clutter.*If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.

    Be sure that your comments actually contribute to the solution of the problem. This is not a political forum.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using Named Ranges in non-function formula
    By leaning in forum Excel General
    Replies: 2
    Last Post: 08-14-2018, 12:35 AM
  2. [SOLVED] Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula
    By DESSTRO in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-20-2017, 08:37 PM
  3. [SOLVED] VBA creates named ranges, but named ranges disappear
    By BrotherNeptune in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2015, 03:22 PM
  4. Named ranges in a formula
    By slabs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-24-2015, 11:51 PM
  5. Define only 2 named ranges from a list of named ranges...
    By abhi900 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2014, 04:20 AM
  6. [SOLVED] Named ranges in IF formula
    By Arturas in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-22-2012, 09:59 AM
  7. Named ranges using a named formula
    By cad1llac in forum Excel General
    Replies: 6
    Last Post: 10-22-2011, 07:37 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