+ Reply to Thread
Results 1 to 10 of 10

Need Forumla to contain If statement

  1. #1
    Registered User
    Join Date
    09-21-2010
    Location
    YN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Need Forumla to contain If statement

    My current formula is ='[Forum1.xlsx]SheetName'!A3

    I need this formula to now only display the results "If Column F3 contains the word Yes"

    Then I also need another formula to only display the results "If Column F3 contains the word No"

    Could someone help me? Thanks

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Need Forumla to contain If statement

    assuming F3 is in currrent workbook, on current worksheet:

    =IF(F3="Yes",'[Forum1.xlsx]SheetName'!A3,"")
    =IF(F3="No",'[Forum1.xlsx]SheetName'!A3,"")

    Hope that Helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Registered User
    Join Date
    09-21-2010
    Location
    YN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Forumla to contain If statement

    F3 is in forum1.xlsx SheetName

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Need Forumla to contain If statement

    Try:
    =IF'[Forum1.xlsx]SheetName'!F3="Yes",'[Forum1.xlsx]SheetName'!A3,"")
    =IF'[Forum1.xlsx]SheetName'!F3="No",'[Forum1.xlsx]SheetName'!A3,"")

  5. #5
    Registered User
    Join Date
    09-21-2010
    Location
    YN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Forumla to contain If statement

    Its telling me the formula is invalid.

  6. #6
    Registered User
    Join Date
    09-21-2010
    Location
    YN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Forumla to contain If statement

    Sorry... I had to change some of the text in formula 1

    Our full formula originally is: ='T:\Folder 1\Folder 2\[Forum1.xlsx]SheetName'!A3

  7. #7
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Need Forumla to contain If statement

    dredwolf's formulas should work, there was just a small typo in them. Here are the edited formulas:

    =IF('[Forum1.xlsx]SheetName'!F3="Yes",'[Forum1.xlsx]SheetName'!A3,"")
    =IF('[Forum1.xlsx]SheetName'!F3="No",'[Forum1.xlsx]SheetName'!A3,"")
    Taming the Excel dragon... www.TheExcelphile.com

  8. #8
    Registered User
    Join Date
    09-21-2010
    Location
    YN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Forumla to contain If statement

    So this should work:

    =IF('T:\Folder 1\Folder2\[Forum1.xlsx]SheetName'!F3="Yes",'T:\Folder 1\Folder 2\[Forum1.xlsx]SheetName'!A3,"")

    =IF('T:\Folder 1\Folder2\[Forum1.xlsx]SheetName'!F3="No",'T:\Folder 1\Folder 2\[Forum1.xlsx]SheetName'!A3,"")

  9. #9
    Registered User
    Join Date
    09-21-2010
    Location
    YN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Forumla to contain If statement

    When I paste that formula, its showing blank in the cell I put it in. Then I have to drag and expand that box to another cell and it puts the data in the second cell.

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Need Forumla to contain If statement

    sorry about the typo
    If F3 on '[Forurm1.xlsx]SheetName' does not contain yes or no, the cell the formula is in will be blank
    the drag adjusts the formula to a new reference( say F4 if you drag it down) which then had "Yes" or "No" in it, so it returned the value

    Hope that Helps

+ 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