+ Reply to Thread
Results 1 to 3 of 3

If formula gives blank cell, then run another function

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-03-2021
    Location
    Brussels
    MS-Off Ver
    Microsoft 365
    Posts
    186

    If formula gives blank cell, then run another function

    Please check the attachment.

    In Cell D6, I applied the formula =LEFT(C3,4) to retrieve the first four digits of the Cell C6 which corresponds to the year of the bill. This works fine.

    However, if Cell C6 is empty then it returns a blank cell. In this case, I want the cell to perform another similar formula that is to retrieve the year (YYYY) of the Cell F6 which is encoded in a Date format.

    Can someone help me to combine both rules?

    Thanks
    Simon
    Attached Files Attached Files
    Last edited by jeriss; 04-08-2022 at 03:06 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,767

    Re: If formula gives blank cell, then run another function

    Try this:

    =IF(C3="",YEAR(F3),LEFT(C3,4))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    12-03-2021
    Location
    Brussels
    MS-Off Ver
    Microsoft 365
    Posts
    186

    Re: If formula gives blank cell, then run another function

    Problem solved! Thank you so much!

+ 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] IF function formula that includes leaving the cell blank if the range column has no data
    By mary maggs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2021, 01:32 PM
  2. Using TODAY Date Function in formula and leaving cell blank until needed.
    By slugger23 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-14-2016, 05:04 PM
  3. Replies: 3
    Last Post: 06-19-2015, 02:56 PM
  4. Replies: 5
    Last Post: 08-15-2014, 08:33 AM
  5. [SOLVED] Cell referenced in formula has no information displayed (shows blank), return blank cell
    By nunayobinezz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2013, 04:51 PM
  6. formula to return blank cell - IF function
    By n1kk1 in forum Excel General
    Replies: 3
    Last Post: 12-17-2009, 08:14 AM
  7. IF Function - Refer the cell which is Blank by value but formula is there
    By acsishere in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-15-2008, 08:51 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