+ Reply to Thread
Results 1 to 5 of 5

Better version of "If cell is not blank get value"?

  1. #1
    Registered User
    Join Date
    09-10-2008
    Location
    Los Angeles
    Posts
    10

    Better version of "If cell is not blank get value"?

    I concatenate a lot of text in my formulas and I am constantly writing different versions of this formula:
    Please Login or Register  to view this content.
    sometimes it's looking at a straight cell. Other times it's with a VLookup:
    Please Login or Register  to view this content.
    Is there a better way to do this check? In long formulas it seems like this adds unneeded glut.
    I am thinking something like:
    Please Login or Register  to view this content.
    And if the cell has contents it would use it if not it would just be blank.

    Is there a formula like that or a better approach in general?
    Last edited by 5150photo; 05-31-2016 at 07:42 PM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Better version of "If cell is not blank get value"?

    If the target cell contains text you can use the T(...) function.

    =IF(A1="","",A1)

    =T(A1)


    =IF(VLOOKUP(A1,Data,2,FALSE)="","",VLOOKUP(A1,Data,2,FALSE))

    =T(VLOOKUP(A1,Data,2,0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: Better version of "If cell is not blank get value"?

    Or try this ...

    =VLOOKUP(A1,Data,2,0)&""

  4. #4
    Registered User
    Join Date
    09-10-2008
    Location
    Los Angeles
    Posts
    10

    Re: Better version of "If cell is not blank get value"?

    Both of those are much better solutions.

    Thank you guys so much.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Better version of "If cell is not blank get value"?

    You're welcome. Thanks for the feedback!

+ 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. In DATABASE criteria "Blank Cell" AND ="" are NOT the same things??
    By damlays in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-27-2015, 04:03 PM
  2. [SOLVED] Keeping particular cell blank if the related cells show "0" or "blank"
    By Anuru in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2014, 05:30 AM
  3. Replies: 6
    Last Post: 09-25-2013, 01:51 PM
  4. solution for the blank cell using the IF function
    By ragnaedge in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 11:03 AM
  5. [SOLVED] Test for blank cell should be "True" but "False" action is taken.
    By Aceso in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-09-2013, 05:47 PM
  6. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  7. Replies: 3
    Last Post: 12-14-2006, 01:36 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