+ Reply to Thread
Results 1 to 14 of 14

Writing Multiple Formulas in a Cell

  1. #1
    Registered User
    Join Date
    01-03-2024
    Location
    UK
    MS-Off Ver
    office 365
    Posts
    19

    Writing Multiple Formulas in a Cell

    Hi,
    I've got a column of cells that have values from projects in them.
    I want to write a formula that based upon value i want to minus X amount of days from the delivery date column.
    basically in simple terms I want to write the following:-

    if value >10,000 then date-2
    if value >=10,000 then date-3
    if value <20,000 hen date-4
    if value <30,000 then date-5

    etc.....
    but i want to use working days as opposed to 7 day week.

    please refer to attached Excel sheet.

    Contract Register(1).xlsx

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,538

    Re: Writing Multiple Formulas in a Cell

    Your requirements don't make sense. 11,000 would be > 10,000, hence date - 2. But it is also >= 10,000, so maybe date - 3?

    And it is also < 20,000 and 30,000 do date - 4 and also date - 5.

    You can use a nested IF for this type of calculation. And you can use the WORKDAY function to subtract working days from a start date.

    https://support.microsoft.com/en-us/...6-60d494efbf33
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Writing Multiple Formulas in a Cell

    Assuming that date-2 was supposed to be < 10000, maybe something like...
    if value >10,000 then date-2
    if value >=10,000 then date-3
    if value <20,000 hen date-4
    if value <30,000 then date-5

    =date(-if(value>30000,5,if(value>....

    OK so maybe you need to take another look at your rules. As TMS said, they make no sense.
    A value that is >= 10000 is also < 20000 etc
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Writing Multiple Formulas in a Cell

    Please try =LOOKUP(value,{0;10000;20000;30000};{date-2;date-3;date-4;date-5})

  5. #5
    Registered User
    Join Date
    01-03-2024
    Location
    UK
    MS-Off Ver
    office 365
    Posts
    19

    Re: Writing Multiple Formulas in a Cell

    Hi All,
    Thank you for your replies and suggestions.
    I think I may have typo error on the => it should be greater than 10,000 etc...
    Will let you know which one works.

    Thanks again.

  6. #6
    Registered User
    Join Date
    01-03-2024
    Location
    UK
    MS-Off Ver
    office 365
    Posts
    19

    Re: Writing Multiple Formulas in a Cell

    Hi All,
    I'm still struggling tbh.

    I'm trying to get the cell that’s named manufacture completion date to change based on the value cells and the agreed delivery date cell.
    I want to add a formula that says if the value cell has a value less than £10,000 then agreed delivery date is minus 2 days but using working days (5 days a week) and so on but i want to add other scenarios in the same formula for other values added below.


    if value >10,000 then date-3
    if value >20,000 hen date-4
    if value >30,000 then date-5

    please see screen shot exmaple.


    Screenshot 2024-01-29 110944.jpg
    Last edited by dbutler43; 01-29-2024 at 08:17 AM.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Writing Multiple Formulas in a Cell

    That makes more sense...
    (Cant easily see your cells, so Im using A! - change as needed)

    =date-cell-if(A1>30 000,5,if(A1>30 000,4,if(A1>10 000,3,0)

  8. #8
    Registered User
    Join Date
    01-03-2024
    Location
    UK
    MS-Off Ver
    office 365
    Posts
    19

    Re: Writing Multiple Formulas in a Cell

    Hi FDibbins,
    Thanks for your suggestion.
    unfortunately, that didn’t work.
    changed the A's to relevant cells but came up with an error.

    The screenshot was taken from the excel file attached to my first post if that’s any help.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Writing Multiple Formulas in a Cell

    Screenshot did not come through, try attaching the file again?

  10. #10
    Registered User
    Join Date
    01-03-2024
    Location
    UK
    MS-Off Ver
    office 365
    Posts
    19

    Re: Writing Multiple Formulas in a Cell

    Hi FDibbins,
    Apolgises I mean't the screenshot shown on my reply on the 01-29-24 and then excel sheet referring to my first post.

  11. #11
    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. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,231

    Re: Writing Multiple Formulas in a Cell

    Screenshots are of little use. Attach a copy of the workbook where you have attempted to implement the solution offered.
    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.

  12. #12
    Registered User
    Join Date
    01-03-2024
    Location
    UK
    MS-Off Ver
    office 365
    Posts
    19

    Re: Writing Multiple Formulas in a Cell

    Hi AliGW,
    The workbook is attached on my first post.

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Writing Multiple Formulas in a Cell

    in Manuf col G you have an error reference - you need to fix that before doing anything else. I cant tell what it is supposed to be aiming at (maybe Master col G)?

    G3=IF(Master!$F2 = "IN MANUFACTURE",Master!#REF!, "N/A")

  14. #14
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2403)
    Posts
    370

    Re: Writing Multiple Formulas in a Cell

    Assuming the values based on M3 value of the Manufacture sheet. Going to assume the Drawn By was a list of staff(assumption)

    Try this in J3 copied down, seem to work but have a look at
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by russkris; 02-01-2024 at 01:50 AM. Reason: Added attachment

+ 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. Replies: 4
    Last Post: 10-19-2016, 02:45 PM
  2. [SOLVED] Writing 2 formulas within one cell
    By yelmoujahid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-02-2014, 05:30 PM
  3. navigating while writing cell formulas - any way to modify default functionality?
    By riwiseuse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-20-2011, 08:32 AM
  4. Multiple formulas in selected cell without damaging previous formulas.
    By excel5111987 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-05-2011, 06:15 AM
  5. writing SUMIF formulas
    By jimmybrine in forum Excel General
    Replies: 4
    Last Post: 10-27-2009, 01:31 AM
  6. writing formulas in VB - referring to the values contained in cell
    By Josie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2006, 02:40 PM
  7. Writing formulas ...
    By Sige in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-27-2005, 10:05 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