Excel Formula Help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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:
 
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.
 
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
 

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)
 
Joined
Jul 25, 2004
Messages
5,456
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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top