+ Reply to Thread
Results 1 to 6 of 6

trying to return a blank cell if one of two conditions are met

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    5

    trying to return a blank cell if one of two conditions are met

    Hello all and thank you for reading this.

    I have a multi-sheet form. One sheet has the raw data and the other is putitng that data to a template format for a database import. Currently, I'm using =IFERROR(IF(raw!A2<1|""|raw!A2)|""), This works as intened, if there is a value in the A2 cell, then that value is printed to the template form. The database needs to see an empty cell if there is no data or it will import the formula to the database.

    Setting up a new template has posed a problem. The data now includes cells with (blank) in them. The above formula will see that as a value >1 and print, "(blank)" to the template. I can't have this either. So, I 'm trying to create a formula that will look at a cell and if it is <1 or has the text (blank) to return a "" to the cell or if its >1 and not (blank) to print cells content.

    My attempts at using "IF(or" and IF(and" have failed miserably any help would be greatly appreciated.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: trying to return a blank cell if one of two conditions are met

    Quote Originally Posted by suicycoe View Post
    I'm using =IFERROR(IF(raw!A2<1|""|raw!A2)|""), This works as intened,
    What exactly is intended? This syntax is not valid. Did you mean to use commas instead of vertical bars?

    I think this matches your description:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: trying to return a blank cell if one of two conditions are met

    Perhaps this:
    =IF(OR(raw!A2<1,raw!A2="(blank)"),"",raw!A2)

    Apparently the data in A2 is supposed to be numeric. If so, is it a NUMBER, or TEXT of a number?
    (Select A2, Click Clear..Clear Formats on the Home ribbon. Text will be left-justified. Numbers will be right-justified.)

    If the values are actual numbers, this might be more robust:
    =IF(and(ISNUMBER(raw!A2),raw!A2>=1),raw!A2,"")
    Last edited by leelnich; 05-15-2017 at 09:31 PM.

  4. #4
    Registered User
    Join Date
    09-11-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: trying to return a blank cell if one of two conditions are met

    @ 6stringjazzer

    This does work as intended. This is pipe delimited instead of comma delimited. Works the same way, just use a different syntax. Some of my clients want reports in pipe delimited instead of comma. You make a change in the Region and Language setting to get this. https://www.howtogeek.com/howto/2145...ead-of-commas/.

    When I plug in the above formula, I still getting the work (blank) to pass thru instead of being an empty cell.

  5. #5
    Registered User
    Join Date
    09-11-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: trying to return a blank cell if one of two conditions are met

    @leelnich

    This WORKED!!!

    The first formula was the ticket. Worked great. Thank you !!!!

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: trying to return a blank cell if one of two conditions are met

    Quote Originally Posted by suicycoe View Post
    This does work as intended. This is pipe delimited instead of comma delimited. Works the same way, just use a different syntax. Some of my clients want reports in pipe delimited instead of comma. You make a change in the Region and Language setting to get this. https://www.howtogeek.com/howto/2145...ead-of-commas/.
    I have never needed to do this and I am surprised to learn that the only way to change the comma to a pipe in a CSV file is to make a setting change in Windows. This is an unusual technique and it would help to mention this if you post a formula with nonstandard syntax.
    When I plug in the above formula, I still getting the work (blank) to pass thru instead of being an empty cell.
    Sorry, I thought you literally meant a blank cell, not the text string "(blank)"

+ 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 two cells are blank then return blank, else vlookup cell with populated data
    By Jason G in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2017, 10:20 AM
  2. Replies: 1
    Last Post: 07-22-2016, 04:03 PM
  3. Return first non blank cell (cells have formulas that return blank)
    By BG1983 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2016, 04:06 PM
  4. Index/ Match Formula, How to return blank cell as a blank not 0
    By MDResearcher in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-24-2016, 08:40 PM
  5. [SOLVED] When my formula encounters a blank cell it returns a 0, I need it to return a blank
    By stretch99 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2014, 07:52 PM
  6. [SOLVED] If Statement to Return blank cell if 2 conditions aren't met?
    By karryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-05-2014, 12:46 PM
  7. [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

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