+ Reply to Thread
Results 1 to 8 of 8

Default to a backup value if one cell is blank

  1. #1
    Registered User
    Join Date
    01-31-2017
    Location
    Philippines
    MS-Off Ver
    15
    Posts
    18

    Default to a backup value if one cell is blank

    Hi experts,
    I'm having trouble on how to show the value in C2 if there's no value in D2.
    Please look at the sample that i attached in here.
    F2 should be 15 not 0.

    Adding Reputation to you is all i can do for helping me
    Attached Files Attached Files
    Last edited by khr0n0s; 03-05-2017 at 09:21 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Default to a backup value if one cell is blank

    Something like this maybe:

    In F2: =IF(LEN(D2)=0, C2, D2)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-31-2017
    Location
    Philippines
    MS-Off Ver
    15
    Posts
    18

    Re: Default to a backup value if one cell is blank

    Quote Originally Posted by JBeaucaire View Post
    Something like this maybe:

    In F2: =IF(LEN(D2)=0, C2, D2)
    This will erase the formula in F2. I want to keep the formula but can't return to C2 value.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Default to a backup value if one cell is blank

    Hi khr0n0s,

    I think the problem might be that your first "A" has a space in front of it? See the attached for two different methods to get what I think you want.

    I want rep.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Default to a backup value if one cell is blank

    Enter in E2 and copy down then you formula in F2 will work
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F
    1 Blah Blah 1 Date Blah Blah 2 Blah Blah 3 Helper (hide column) Result
    2 A 1/1/2017 10 A 15
    3 1/2/2017 A
    4 1/3/2017 A
    5 1/4/2017 5 A
    6 1/5/2017 A
    7 1/6/2017 A
    8 1/8/2017 A
    9 B 1/9/2017 15 7 B -3
    10 1/10/2017 1 B
    11 1/11/2017 2 B
    12 1/12/2017 3 B
    13 1/13/2017 2 2 B
    14 1/14/2017 5 B
    15 C 1/13/2017 10 6 C 4
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    01-31-2017
    Location
    Philippines
    MS-Off Ver
    15
    Posts
    18

    Re: Default to a backup value if one cell is blank

    Quote Originally Posted by MarvinP View Post
    Hi khr0n0s,

    I think the problem might be that your first "A" has a space in front of it? See the attached for two different methods to get what I think you want.

    Attachment 505428
    Hi MarvinP
    In your first method, the formula's in other cell is gone?

    In your second method, it is not changing even i place a value in D column.

    i think this will be hard more than i expected. hehe

  7. #7
    Registered User
    Join Date
    01-31-2017
    Location
    Philippines
    MS-Off Ver
    15
    Posts
    18

    Re: Default to a backup value if one cell is blank

    Quote Originally Posted by AlKey View Post
    Enter in E2 and copy down then you formula in F2 will work
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F
    1 Blah Blah 1 Date Blah Blah 2 Blah Blah 3 Helper (hide column) Result
    2 A 1/1/2017 10 A 15
    3 1/2/2017 A
    4 1/3/2017 A
    5 1/4/2017 5 A
    6 1/5/2017 A
    7 1/6/2017 A
    8 1/8/2017 A
    9 B 1/9/2017 15 7 B -3
    10 1/10/2017 1 B
    11 1/11/2017 2 B
    12 1/12/2017 3 B
    13 1/13/2017 2 2 B
    14 1/14/2017 5 B
    15 C 1/13/2017 10 6 C 4

    Commended. Thanks :D
    Last edited by khr0n0s; 03-05-2017 at 09:59 PM.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Default to a backup value if one cell is blank

    In the second method you need to refresh the Pivot Table for it to show the correct answer.

+ 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. Replies: 3
    Last Post: 10-16-2013, 07:17 AM
  2. Default text in 1 cell when blank - to remain once subsequent text deleted
    By thedude1222 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 08:45 AM
  3. [SOLVED] How to make a dropdown list cell default to blank, after another cell selection is made
    By chardsmith in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2013, 03:46 AM
  4. if cell is blank, can u make it say something by default using a formula?
    By teenyjem in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-07-2012, 01:04 AM
  5. Replies: 4
    Last Post: 02-20-2012, 02:24 PM
  6. Prefill MonthDate,Clear cell & Default to last blank cell
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-17-2011, 10:08 PM
  7. Display 'Date' cell as blank instead of default year 1900
    By charger100 in forum Excel General
    Replies: 5
    Last Post: 11-19-2009, 05:21 PM
  8. [SOLVED] Backup:always create a backup file in the save options
    By Alek in forum Excel General
    Replies: 1
    Last Post: 01-07-2006, 09:25 PM

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