+ Reply to Thread
Results 1 to 11 of 11

How to make a cell display nothing if nothing is in the cell its referring to.

  1. #1
    Registered User
    Join Date
    08-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    How to make a cell display nothing if nothing is in the cell its referring to.

    I posted this a few days ago and got a quick response, but the formula that I was using didn't work for a few things, so I was forced to change my formula.

    I used to have this formula: =IF(D5="","",25+5*SUMPRODUCT(--(MID(D5,ROW(1:255),1)="*"))) which, if D5 was empty, would make the cell containing the formula display nothing.

    I am now using this formula: =IF(LEN(A5)-LEN(SUBSTITUTE(A5,"*",""))=3,40,IF(LEN(A5)-LEN(SUBSTITUTE(A5,"*",""))=1,30,IF(LEN(A5)-LEN(SUBSTITUTE(A5,"*",""))=2,35,IF(LEN(A5)-LEN(SUBSTITUTE(A5,"*",""))=4,45,IF(LEN(A5)-LEN(SUBSTITUTE(A5,"*",""))=5,50,25))))), which does the exact same thing, but still displays the final value (25) even if nothing is in the cell it is referring to.

    I've tried adding IF(A5="","",(LEN...25))))), IF(A5="","",LEN...25)))))) and neither have worked.
    Last edited by Nexion21; 08-12-2013 at 01:09 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  3. #3
    Registered User
    Join Date
    08-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    EDIT: That displays nothing when there is something other than an asterisk in the cell. I need it to be blank when there is absolutely nothing in the cell, not just when there isn't an asterisk.
    Last edited by Nexion21; 08-12-2013 at 01:34 PM.

  4. #4
    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: How to make a cell display nothing if nothing is in the cell its referring to.

    Hi Mexion21

    I think the problem with your formula is the last part ,IF(LEN(A5)-LEN(SUBSTITUTE(A5,"*",""))=5,50,25)))))

    Replace 25 with "" and see if this will work.
    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

  5. #5
    Registered User
    Join Date
    08-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    I need the 25 there so it displays 25 when I have a stock number but no asterisks. Example:

    M3353 | 25
    M5949 * | 30
    M3533 ** | 35
    Last edited by Nexion21; 08-12-2013 at 01:39 PM.

  6. #6
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    The formula I provided is blank when there is nothing inside of the A5 cell. Have you tried checking the formatting of your cells?

  7. #7
    Registered User
    Join Date
    08-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    You are correct, it is blank when there is nothing inside the cell, but it is also blank when there is no asterisk. It's turning up like this:

    M3353 | ____ (Where _ = nothing)
    And I need it to show up like this:

    M3353 | 25

  8. #8
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    You didn't make clear what the cells were going to be populated with. Next time be a little more descriptive in your post please.

    Try this then
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    Sorry about the descriptiveness, but thank you for your help! It's working now.

  10. #10
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: How to make a cell display nothing if nothing is in the cell its referring to.

    I'm glad I could help.

  11. #11
    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: How to make a cell display nothing if nothing is in the cell its referring to.

    It looks like this whole thing could've been done with simple formula like this:

    =IF(A5="","",TRIM(RIGHT(A5,LEN(A5)-FIND("|",A5))))

    at least based on the data samples provided.

+ 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: 5
    Last Post: 03-08-2012, 11:17 AM
  2. trying to make a cell display results from other.
    By jediknight in forum Excel General
    Replies: 6
    Last Post: 07-29-2010, 06:57 AM
  3. make a cell display warning if
    By stevecontracts in forum Excel General
    Replies: 5
    Last Post: 01-26-2010, 08:37 AM
  4. How to make a shape display when a cell is click.
    By romancebao in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2009, 05:00 PM
  5. How to make a shape display when a cell is click.
    By romancebao in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2009, 03:10 PM

Tags for this Thread

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