+ Reply to Thread
Results 1 to 3 of 3

Yes/No Switch for Existing Formulas?

Hybrid View

  1. #1
    Registered User
    Join Date
    02-24-2014
    Location
    USA
    MS-Off Ver
    365
    Posts
    18

    Question Yes/No Switch for Existing Formulas?

    I am trying to add a yes/no switch in a column which would determine if the lines are included in the below formula's calculations. I thought a simple IF statement would work, but I can't get it to work.

    So these formulas should only include summing the rows which have column P (on the Lengths sheet) as a "yes".

    =SUMIF('Lengths'!L:L,"2",'Lengths'!N:N)

    =ROUND(SUM('Lengths'!I:I)/1000,0)

    Thank you!!!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,468

    Re: Yes/No Switch for Existing Formulas?

    This:

    Formula: copy to clipboard
    =SUMIFS(Lengths!N:N,Lengths!L:L,"2",Lengths!P:P,"yes")


    Formula: copy to clipboard
    =ROUND(SUM((Lengths!I:I)*(Lengths!P:P="yes"))/1000,0)


    Or:
    Formula: copy to clipboard
    =ROUND(SUMIF(Lengths!P:P,"yes",Lengths!I:I)/1000,0)
    Last edited by TMS; 04-16-2025 at 07:07 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,468

    Re: Yes/No Switch for Existing Formulas?

    Is this resolved now?



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon (Next to Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Why I cannot switch formulas in a complex formula?
    By Delta_Fox in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-06-2024, 06:49 AM
  2. Single Button Toggle Switch To Switch Between Columns
    By Zaerick in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-29-2022, 11:55 PM
  3. [SOLVED] How to add formulas on top of existing formulas in batch?
    By MsRoooose in forum Excel General
    Replies: 10
    Last Post: 08-01-2020, 01:01 AM
  4. [SOLVED] Switch between formulas using drop down list
    By gko_87 in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 05-10-2017, 05:13 PM
  5. Replies: 0
    Last Post: 04-22-2014, 10:59 AM
  6. Help modifying macro to wrap iferror formulas around existing formulas
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2012, 02:04 PM
  7. Existing formulas.
    By Ricky1947 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2007, 03:53 PM

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