Closed Thread
Results 1 to 7 of 7

Stop INDIRECT function returning a 0 if cell is blank?

  1. #1
    Registered User
    Join Date
    01-31-2015
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    91

    Stop INDIRECT function returning a 0 if cell is blank?

    Hi all

    I'm new to the board so forgive me if I mess up.

    I have a very basic INDIRECT function that is pulling data from a different page within the same workbook.

    Please Login or Register  to view this content.
    As you can see its referencing cell A1 of the Costs page.

    The problem I'm having is if Cell A1 is blank (no data typed into it) then the function is return a 0 in the cell that the function is typed in.

    I need it to keep the cell blank if no data exists in cell A1 of the Costs page.

    I have been bashing my head on the screen all evening and cannot seem to understand how to make this work (can't see the wood for the tree's) so I'm hoping some of you kind people may be able to tell me where I am going wrong.

    Thanks in advance

    Bel

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Stop INDIRECT function returning a 0 if cell is blank?

    =IF(ISBLANK(INDIRECT("Costs!A1")),"",INDIRECT("Costs!A1"))
    try this
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Stop INDIRECT function returning a 0 if cell is blank?

    Hi, welcome to the forum

    Unless there is more to your formula that you have mentions, then Im not sure why you would need to use INDIRECT() here...
    =INDIRECT("Costs!A1")
    .
    If you are simply referencing cell A1 on sheet Cost, then you could simplify that to...
    =cost!A1

    Or, rather...
    =IF(cost!A1="","",cost!A1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-31-2015
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    91

    Re: Stop INDIRECT function returning a 0 if cell is blank?

    nflsales, thanks for the reply and your suggestion.

    It was perfect and did exactly what I wanted,

    Thanks again.

  5. #5
    Registered User
    Join Date
    01-31-2015
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    91

    Re: Stop INDIRECT function returning a 0 if cell is blank?

    Hi FDibbins

    Thanks for the reply and suggestion.

    No my formula is exactly as stated but as I said in my original post the formula is pulling data from a different page within the same workbook.

    If a user drags the contents of one cell to replace another, or just cuts and pastes from one cell into another the formulas get confused and display #REF.

    By making them INDIRECT, this over comes this unwanted behavior from Excel..

    Thanks again.

  6. #6
    Registered User
    Join Date
    12-03-2021
    Location
    Maastricht, The Netherlands
    MS-Off Ver
    Microsoft Office 2010
    Posts
    1

    Re: Stop INDIRECT function returning a 0 if cell is blank?

    I have this exact same problem and I followed the suggestion of FDibbins but it did not work. Could I ask what solution did you achieve here?? I see that nflsales reply is missing as well. Thanks in advance!
    Last edited by Cardio_Excel; 12-03-2021 at 09:59 AM.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Stop INDIRECT function returning a 0 if cell is blank?

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Want function to stop calculating when it reaches a blank cell
    By GrogRogers in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2015, 03:49 PM
  2. Replies: 4
    Last Post: 12-28-2014, 02:43 PM
  3. [SOLVED] Stop Indirect Formula returning zeros
    By pauldaddyadams in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-31-2013, 05:32 AM
  4. [SOLVED] If function returning incorrect value reference cell value is blank
    By lbrannon in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-23-2013, 09:40 AM
  5. INDIRECT with VLOOKUP not working, returning blank
    By trizzo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2013, 10:56 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