+ Reply to Thread
Results 1 to 3 of 3

Create Quarter/Year Field, but if blank, either populate cell with ERROR or leave blank

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Fairbury NE
    MS-Off Ver
    Excel 2007
    Posts
    70

    Create Quarter/Year Field, but if blank, either populate cell with ERROR or leave blank

    I'm using the following formula to create a quarter and year for my pivot table:

    ="Q"&INT((MONTH(D1)+2)/3)&TEXT(D1," yy")

    It works for the most part, but when the cell it pulls from is blank, it returns Q1 00. Any suggestion on how to return either an ERROR or blank cell when the cell is blank?

  2. #2
    Forum Guru Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Create Quarter/Year Field, but if blank, either populate cell with ERROR or leave blan

    Use
    =IF(D1="","","Q"&INT((MONTH(D1)+2)/3)&TEXT(D1," yy"))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Fairbury NE
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Create Quarter/Year Field, but if blank, either populate cell with ERROR or leave blan

    Thanks! This works perfectly.

+ 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] Simple pull exact text from cell, if blank it pulls up a 0. How to leave it as blank?
    By sharpmel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2012, 02:20 PM
  2. Merge field with comma after and leave blank
    By kittya in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 04-11-2011, 12:01 PM
  3. Leave cell blank when there is an error
    By Cerberus in forum Excel General
    Replies: 2
    Last Post: 06-30-2010, 01:30 PM
  4. Replies: 4
    Last Post: 07-15-2008, 01:42 PM
  5. [SOLVED] Leave Cell Blank if value is an error, below 0 or above 80
    By SteveC in forum Excel General
    Replies: 4
    Last Post: 05-12-2006, 09:34 AM

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