+ Reply to Thread
Results 1 to 3 of 3

Similar formulas, one gives blank cell other gives 0 (added attachment)

  1. #1
    Registered User
    Join Date
    12-20-2010
    Location
    Wales
    MS-Off Ver
    Excel 2007
    Posts
    40

    Similar formulas, one gives blank cell other gives 0 (added attachment)

    I can't see any differences in the two formulas but the top formula gives a blank cell and the other gives a zero. It should be blank on both.
    I've tried swapping cells but the second formula still gives a zero.
    Driving me nuts, please tell me what may be wrong.

    Cell "A" is a formula to get text from another sheet. Sometimes this produces a blank cell.
    Cell "C" is a formula to get a number from another sheet. If cell "A" is blank then so is this one.

    IF($C18>0,LEFT($A18,3),MID($A18,5,3))

    IF($C18>0,MID($A18,5,3),LEFT($A18,3))

    It's no big deal but I would like to find out what is wrong.

    Thanks in advance........

    P.S. Maybe I should have explained that I do have both working formulas (without zeros) but didn't understand why swapping left and mid produced the zero.
    Rob
    Last edited by Rob44; 06-02-2014 at 07:34 PM. Reason: Added attachment

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Similar formulas, one gives blank cell other gives 0

    It's really hard to say without seeing your sheet.

    What exactly is in C18 and A18 ?

    Can you post a sample book?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Similar formulas, one gives blank cell other gives 0

    Hi,

    We can probably only answer this if we can see the formulae in context. Can you upload the workbook or at least the relevant part of it?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Help with Formulas, how to keep a cell blank
    By stevedd01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2013, 02:00 PM
  2. Two similar VBA formulas, only one work....
    By mikk0077 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 05:42 AM
  3. Replies: 0
    Last Post: 02-11-2013, 05:25 PM
  4. Adding a new row need to keep similar cell formulas
    By qwertyas in forum Excel General
    Replies: 4
    Last Post: 08-19-2010, 02:49 PM
  5. Need similar formulas to do the job
    By sonar in forum Excel Formulas & Functions
    Replies: 87
    Last Post: 09-07-2005, 12:05 AM

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