+ Reply to Thread
Results 1 to 7 of 7

add if statement to an if statement

  1. #1
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    add if statement to an if statement

    Hi all,

    i want to add the two following codes together

    this one is already in please

    Please Login or Register  to view this content.
    i want to add this to it as it relates to a check box

    Please Login or Register  to view this content.

  2. #2
    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: add if statement to an if statement

    is this what you are wanting?...
    =IFERROR(IF($F8="paid","",IF(E8="","",(IF((H8-TODAY())>2, "Processing", IF(H8-TODAY()<0,"Late", "Due"))))),"Processing")
    the key to it is what takes priority? does the "paid" value in F8 mean that everything else will be irrelevant? if so that is the position for it. The order in IF/THEN statements is important as whatever is solved first the rest becomes irrelevant.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: add if statement to an if statement

    is it easy to then add that to a check box? as this is what i was trying to achieve

    https://www.datanumen.com/blogs/3-me...ontents-excel/
    Attached Files Attached Files
    Last edited by Learning ExL; 03-23-2020 at 07:36 AM.

  4. #4
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: add if statement to an if statement

    i found some code from 10yrs ago which hides the checkbox if there is nothing in E9 but as soon as i put a date into E9 the checkbox show which is what i want woop! woop! however does this mean that i have to type this code 58 times as i have 58 checkboxes?

    Please Login or Register  to view this content.
    all i need to do is now work out how on earth to add text to a cell if checkbox is checked, i tried to do what the link in my last post suggested but i cant seem to get it to work

  5. #5
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: add if statement to an if statement

    Quote Originally Posted by Sambo kid View Post
    is this what you are wanting?...
    =IFERROR(IF($F8="paid","",IF(E8="","",(IF((H8-TODAY())>2, "Processing", IF(H8-TODAY()<0,"Late", "Due"))))),"Processing")
    did not work i comes up with "Theres to few arguments"

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: add if statement to an if statement

    Sambo's formula works perfectly for me

  7. #7
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: add if statement to an if statement

    this is how i got it to work

    Please Login or Register  to view this content.
    and to make the check box vanish i used the following

    Please Login or Register  to view this content.
    Last edited by Learning ExL; 03-23-2020 at 10:33 AM.

+ 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] i have an if then statement that works, how to make it work as a with or case statement
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-03-2016, 03:34 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 PM

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