+ Reply to Thread
Results 1 to 18 of 18

Merging two formulas

  1. #1
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Merging two formulas

    So I have this excel sheet and I want to get rid of the weeks waiting column.

    What I want is a formula in the wait time that basically says if date of contact or today minus date referrral received is <1 "1wk", <2 "2wks", <8 "8wks", <12 "12wks", <26 "12- 26wks", <39 "26 - 39wks", <52 "39 - 52wks", >52,"52+wks"

    I am struggling with the first part of the formula.
    As you can see there will be some blanks which is why I want today included so that it will count up the weeks from the date referral received until a date is imputted in the date of contact.

    I have included a sample excel sheet
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Merging two formulas

    Hi,

    If I understand the requirement I'd be inclined to use a lookup table.

    Put the upper limit of each band in the first column c and in the second enter the text you want to return
    Then in H2 use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    or....

    =IF(E2="","",LOOKUP(ROUNDUP((IF(F2="",TODAY(),F2)-E2)/7,0),{1,2,8,12,13,26,39,52},{"1 wk","2 wks","8 wks","12 wks","13 - 26 wks","26 - 39 wks","39 - 52 wks","52+ wks"}))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Re: Merging two formulas

    We tried that but unfortately we do a lot of copying and pasting of patient details to different excel books and also have a couple that aren't excel trained in it so thought this was the easier option.

  5. #5
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Re: Merging two formulas

    Quote Originally Posted by Glenn Kennedy View Post
    or....

    =IF(E2="","",LOOKUP(ROUNDUP((IF(F2="",TODAY(),F2)-E2)/7,0),{1,2,8,12,13,26,39,52},{"1 wk","2 wks","8 wks","12 wks","13 - 26 wks","26 - 39 wks","39 - 52 wks","52+ wks"}))
    Much appreciated for the above formula. That is perfect. Our ladies have a tendancy to move things about!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    Oh, and note that I changed 12-26 weeks to 13-26 weeks, as 12 weeks is already captured... You should do the same for the others, shouldn't you???

  8. #8
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Re: Merging two formulas

    Quote Originally Posted by Glenn Kennedy View Post
    Oh, and note that I changed 12-26 weeks to 13-26 weeks, as 12 weeks is already captured... You should do the same for the others, shouldn't you???
    Yes seen that - only issue is it gives me a N/A for people seen on the same day. For these their wait time should come up one week.

    And anyone waiting longer than a year is showing up as 39-52 in the wait time. Edit - that may have fixed itself.
    Attached Files Attached Files
    Last edited by Karenmc; 12-01-2020 at 10:25 AM.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    Look back later. I'm out for a 6 mile walk!!

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Merging two formulas

    Well, you could adjust what Glenn gave you to cover less than a day with this addition (in red) …
    =IF(E2="","",LOOKUP(ROUNDUP((IF(F2="",TODAY(),F2)-E2)/7,0),{0,1,2,8,12,13,26,39,52},{"less than 1 wk","1 wk","2 wks","8 wks","12 wks","13 - 26 wks","26 - 39 wks","39 - 52 wks","52+ wks"}))

    Not seeing the second issue...
    And anyone waiting longer than a year is showing up as 39-52 in the wait time.
    unless by your edit you are saying it is resolved?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    I removed the ROUNDUP (it was getting in the way...) and twiddled with it a bit... I think it covers all the bases now...
    Attached Files Attached Files

  12. #12
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Merging two formulas

    Quote Originally Posted by Glenn Kennedy View Post
    Look back later. I'm out for a 6 mile walk!!
    Shouldn't that be 9.6 Km Glen?

  13. #13
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Re: Merging two formulas

    I'm thinking it won't show true wait times such as Mr Claus. We have had his referral a month but the wait time shows two weeks.

    Could the lookup be tweaked to includ if it is less that or greater than?
    Attached Files Attached Files

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    According to your original specification, it gives teh correct answer. So, over to you. Please draw up an ACCURATE list of the the cut-off times and phrases. After that, it's easy. I can't do that for you, though... as only YOU know what you want!!

  15. #15
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Re: Merging two formulas

    Our expectations to see patients are 0-3days (this will take into consideration anyone that was referred into us and seen on the same date), 1-2wks, 2-8wks, 8-12wks, 12-24wks, 24-39wks, 39-52wks, 52+wks. We are planning to use this so we can collect stats on how long people are waiting without having been seen and where we may need extra clinics by filtering.

    I understand about the doubling up of certain weeks but I was told this is the way it needs to be recorded for data collection purposes.

    I do appreciate all the help - working full-time in a new position and trying to do an excel course in my spare time (only coming to the formulas now)

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    and for 3 days to 1 week??

  17. #17
    Registered User
    Join Date
    10-29-2020
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    16

    Re: Merging two formulas

    I would like that included in the 1-2weeks.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Merging two formulas

    OK:

    =IF(E2="","",LOOKUP((IF(F2="",TODAY(),F2)-E2),{0,4,14,56,84,168,252,364},{"0-3 d","1-2 wks","2-8 wks","8-12 wks","12-24 wks","24-39 wks","39-52 wks","52+ wks"}))
    Attached Files Attached Files

+ 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. Merging/Adding two Formulas
    By jvddavid in forum Excel General
    Replies: 5
    Last Post: 10-04-2018, 02:54 AM
  2. Merging Formulas
    By Median in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2018, 05:55 AM
  3. [SOLVED] Merging Formulas
    By yuenk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-22-2015, 10:20 AM
  4. merging search and mid formulas
    By shirur19 in forum Excel General
    Replies: 2
    Last Post: 06-10-2014, 05:58 AM
  5. Merging two IF formulas
    By ladod1424 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-23-2014, 06:20 PM
  6. Merging Data/Formulas/Etc
    By bhparke in forum Excel General
    Replies: 1
    Last Post: 05-04-2010, 02:34 AM
  7. Help required in merging two formulas into one
    By Col in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-05-2005, 06:06 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