1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel Formula Help

Discussion in 'Business Applications' started by bobbibonn, Oct 27, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. bobbibonn

    bobbibonn Thread Starter

    Joined:
    Oct 27, 2007
    Messages:
    2
    I hope you can help me with a fairly simple formula, but if formulas are really hard for me.
    I want to put the work PAID in Cell b if Cell c has a date in it, otherwise I want it blank. Thanks in advance for your help.:confused:
     
  2. trevorshaw

    trevorshaw

    Joined:
    Aug 30, 2007
    Messages:
    13
    What will be in cell C if it doesn't have a date, will it be blank?

    If this is the case, try entering formula =IF (Cn = "","", "PAID") in cell B (n is the row number).

    If cell C contains other information as well as a date, then the formula depends on what it can contain.
     
  3. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    I am a little confused by what you are wanting. Are you simply wanting to check for a non-blank value in column C or are you wanting to validate whether the value is a true date or not? If you are are wanting actual date validation I don't believe that Excel has a built in function to check to see if the value is a date. You can create a user defined function though. Press ALT + F11 to bring up the VB editor and click INSERT --> MODULE and copy the code below into the blank module and re-save the workbook.

    Code:
    Public Function CheckDate(vCell As Range)
    
    If IsDate(vCell) Then
    
    CheckDate = True
    
    End If
    
    End Function
    After creating the function you can use an IF statement with the user defined function you created to check for a date value in the cell. Place the following formula in your cell in column B and copy down for all other rows.

    =IF(checkdate(C1),"TRUE","PAID","")

    Regards,
    Rollin
     
  4. bobbibonn

    bobbibonn Thread Starter

    Joined:
    Oct 27, 2007
    Messages:
    2
    Thanks, Trevor, your formula is just what I was looking for. I appreciate the reply Rolliing_again but it was not all that involved. You guys are the greatest!!!(y)
     
  5. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Unfortunately, the only real way to check for an Excel recognized date is the way Rollin has shown you (much like this kb entry). If you check for ISNUMBER() you could get any ole number, not just a date, as dates are expressed as Serial Numbers in Excel. The only other thing you might add to the UDF is Application.Volatile to keep recalc up, but, if not needed I wouldn't suggest it, takes up a lot of resources in recalculating all the time.

    HTH
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/644211

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice