+ Reply to Thread
Results 1 to 5 of 5

Alternative to IF: need to perform different formulae for True and False

  1. #1
    Registered User
    Join Date
    10-23-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    8

    Alternative to IF: need to perform different formulae for True and False

    Hello,

    I'm a bit stumped on this one. If a certain cell="all," I want another cell to display the results of
    "=SUMIFS(OFFSET(FarmLog,0,4),OFFSET(FarmLog,0,1),$A$2,OFFSET(FarmLog,0,3),A9)".
    If it doesn't say "all," I want
    =SUMIFS(OFFSET(FarmLog,0,4),OFFSET(FarmLog,0,1),$A$2,OFFSET(FarmLog,0,2),$A$4,OFFSET(FarmLog,0,3),A9).
    I thought I could use IF, but it seems that it can only return text.

    Any ideas?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Alternative to IF: need to perform different formulae for True and False

    That Doesn't sound right.

    I cannot test your formulae but excel finds an error in the second one.

    Try this and then modify the second formula as required.

    You should really have posted a sample spreadsheet.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 10-23-2013 at 02:26 PM.

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

    Re: Alternative to IF: need to perform different formulae for True and False

    Sure it can...
    Assuming those 2 formulas work on their own..

    =IF(acertaincell="all",putyourfirstformulahere,putyoursecondformulahere)

    when putting the 2 formulas inside this, don't include the = symbol.
    So
    =IF(H37="all",SUMIFS(OFFSET(FarmLog,0,4),OFFSET(FarmLog,0,1),$A$2,OFFSET(FarmLog,0,3),A9),SUMIFS(OFFSET(FarmLog,0,4),OFFSET(FarmLog,0,1),$A$2,OFFSET(FarmLog,0,2),$A$4,OFFSET(FarmLog,0,3),A9))

    I just picked a random cell to be "a certain cell"

  4. #4
    Registered User
    Join Date
    10-23-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Alternative to IF: need to perform different formulae for True and False

    Ah ha! Including the '=' was messing me up. It's working now, thanks.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Alternative to IF: need to perform different formulae for True and False

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] in this TRUE OR FALSE function, i want desired name instead of display true or false
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2013, 06:44 PM
  2. [SOLVED] Search for 2 true arguments and return true or false
    By David in forum Excel General
    Replies: 3
    Last Post: 07-15-2006, 05:20 AM
  3. Function to return True/False if all are validated as True by ISNU
    By Tetsuya Oguma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 06:30 AM
  4. Reverse false and combine with true true value
    By Emmie99 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  5. Reverse false and combine with true true value
    By Emmie99 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02: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