+ Reply to Thread
Results 1 to 3 of 3

How to hide unwanted text in cells

  1. #1
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Dartford
    MS-Off Ver
    Excel 2007
    Posts
    237

    How to hide unwanted text in cells

    I am using the below formula to calculate a date in the future, the only problem is, if there is no date in Cell G Colum I shows 00/01/1900, how do I get rid of this?

    =DATE(YEAR(G2)+H2,MONTH(G2),DAY(G2))
    Shazz
    xx

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to hide unwanted text in cells

    Try:
    =IF(G2="","",DATE(YEAR(G2)+H2,MONTH(G2),DAY(G2)))

    EDIT: Alternative to what you are using: =IF(G2="","",EDATE(G2,H2*12))
    Last edited by Cutter; 04-05-2012 at 07:05 AM.

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to hide unwanted text in cells

    this will help
    =if(G2<>"",DATE(YEAR(G2)+H2,MONTH(G2),DAY(G2)),"")
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

+ 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