+ Reply to Thread
Results 1 to 4 of 4

Prefilling cells with IF statment?

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    16

    Prefilling cells with IF statment?

    If I were to prefill cells with IF statement, that means all other cells (in this case A1 and B1) are blank. How do I add to the IF statement so that if A1 and B1 is not populated, then the IF statement would yeild "0" or stay a blank cell?

    Thanks!
    Last edited by qvp; 02-24-2012 at 05:29 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Prefilling cells with IF statment?

    TRy

    =IF(OR(A1="",B1=""),"",IF(DATEDIF(A1,B1,"m")<=10,"Pink",IF(AND(DATEDIF(A1,B1,"m")>20,DATEDIF(A1,B1,"m")<30),"Dot","Norman")))

  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
    52,939

    Re: Prefilling cells with IF statment?

    begin your if statement with...

    if(and(a1="",b1)="",......and then end the formula with...,"")
    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
    Registered User
    Join Date
    02-07-2012
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Prefilling cells with IF statment?

    thank you both!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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