+ Reply to Thread
Results 1 to 5 of 5

Check a cell’s value for a numerical value or null or space/(s)

  1. #1
    Forum Contributor
    Join Date
    10-18-2019
    Location
    Mumbai
    MS-Off Ver
    OFFICE 2010
    Posts
    427

    Post Check a cell’s value for a numerical value or null or space/(s)

    Cell D2 generates either of a numerical value or null or space/(s).
    E2=IF(D2=null OR space/(s),0,the numerical value)

    How to accomplish?

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Check a cell’s value for a numerical value or null or space/(s)

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

    To account for multiple spaces, you could also try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-18-2019
    Location
    Mumbai
    MS-Off Ver
    OFFICE 2010
    Posts
    427

    Re: Check a cell’s value for a numerical value or null or space/(s)

    Paul May I know what is the difference between the 2 formulas? Rather which one is more useful?

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Check a cell’s value for a numerical value or null or space/(s)

    The first formula only checks for Null or one space character in D2. If either is the case, 0 is returned, otherwise the value in D2 is returned.

    The second formula TRIM's the value in D2 (removing any leading or trailing spaces) first. If D2 was already empty, or had 1+ spaces, it will be seen as empty and the formula will show 0, otherwise it will show the value in D2.

  5. #5
    Forum Contributor
    Join Date
    10-18-2019
    Location
    Mumbai
    MS-Off Ver
    OFFICE 2010
    Posts
    427

    Re: Check a cell’s value for a numerical value or null or space/(s)

    Thanks Paul for sharing the knowledge. I have used your first formula.

+ 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] macro to remove space in numerical numbers
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2021, 01:50 PM
  2. [SOLVED] If and check for Null
    By rpaonline7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-24-2020, 08:42 PM
  3. Vlookup string of alpha numerical with a space and sometimes without
    By Thom7890 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2019, 10:21 PM
  4. [SOLVED] Need to enter value in cell based on Null or numerical value in another
    By markhooten in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2016, 03:52 PM
  5. Replies: 4
    Last Post: 05-20-2014, 01:05 PM
  6. how to check if a range is null
    By kayard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2011, 11:44 AM
  7. Numerical Values Imported As Null Entries from Excel to SQL
    By OilcanHoratio in forum Excel General
    Replies: 0
    Last Post: 12-16-2010, 02:43 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