+ Reply to Thread
Results 1 to 3 of 3

pulling value from different worksheet in IF function

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    pulling value from different worksheet in IF function

    I am trying to use cell from different worksheet as value in IF function. I keep getting this "the name that you entered is not valid". Am I approching this correctly? How do I fix this?

    This is my example formula I'm entering into a cell on sheet1:

    =If(sheet2!D4>=0,[!D4,0])

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: pulling value from different worksheet in IF function

    andydufrane53,

    I don't know what the brackets are trying to do. You would need to list the sheetname each time you reference a cell on a different sheet, like so:
    =IF(sheet2!D4>=0,sheet2!D4,0)

    That formula can be condensed using MAX():
    =MAX(sheet2!D4,0)
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    02-14-2012
    Location
    CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: pulling value from different worksheet in IF function

    This works perfectly.....thx for the shortcut, a great help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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