+ Reply to Thread
Results 1 to 6 of 6

If statement Issue

  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    Baltimore, US
    MS-Off Ver
    Excel 2010
    Posts
    7

    If statement Issue

    Hi all,
    Im new to excel and trying to write an if statement that returns a value from 1 of 2 cells based on the condition.

    Example of what I want to do is below: In a workbook of 3 sheets

    If Cell B3 = 0 in sheet2 return Value in cell B3 of sheet 3 into cell B3 of sheet 1

    If not return value in cell B3 of sheet2 into cell B3 of sheet 1.

    Not sure that the if statement is the way to go hear but ill appreciate some help.

  2. #2
    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,945

    Re: If statement Issue

    try this...

    =if('sheet2'!B3=0,'sheet3'!B3,'sheet2'!B3)
    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

  3. #3
    Registered User
    Join Date
    12-19-2012
    Location
    Baltimore, US
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: If statement Issue

    FDibbins, thanks for your response and that is the statement I tried first and it is not working. Actually I just created a different spreadsheet and the expression above works just fine but in the report I'm working on it doesnt populate the values from sheet3. The cell in sheet 1 is blank when it is supposed to be populated by the value from sheet 3.

    Would you happen to know what that is happening?

  4. #4
    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,945

    Re: If statement Issue

    are you using sheet 3....sheet3 or a different name altogether? (altho excel should tell you off if it cant find the sheet name)

    do you actually have anything in sheet2 B3?

    maybe upload a sample workbook and i will take a look at it

  5. #5
    Registered User
    Join Date
    12-19-2012
    Location
    Baltimore, US
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: If statement Issue

    Nevermind, I got it to work. thanks for the help

  6. #6
    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,945

    Re: If statement Issue

    im happy you figured it out

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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