+ Reply to Thread
Results 1 to 5 of 5

Sum range based on value in another cell

  1. #1
    Registered User
    Join Date
    12-03-2014
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    2

    Sum range based on value in another cell

    I have a cell that has either a 1 or a 0 in my spreadsheet its cell A1, if cell A1 is a 1 I want to add the sum of cells A3 through A7 and put this total in A2. If cell A1 is a 0 i want to insert a 0 in cell A2

  2. #2
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: Sum range based on value in another cell

    In A2

    =If(A1=1,SUM(A3:A7),0)

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

    Re: Sum range based on value in another cell

    Try

    =SUM(A3:A7)*A1

  4. #4
    Registered User
    Join Date
    12-03-2014
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    2

    Re: Sum range based on value in another cell

    Thanks for the responses, both worked thanks

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

    Re: Sum range based on value in another cell

    You're welcome.

+ 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. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  2. [SOLVED] Copy data from a range of cells into a blank range based on common cell
    By vanmeterkj in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-03-2012, 10:18 AM
  3. Conditional Formatting - Grey Out and Lock A range based on a cell value in that range
    By Excelgnome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 07:31 PM
  4. [SOLVED] Hide columns based on cell value - Unable to set hidden range property of Range Class
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-13-2012, 11:13 PM
  5. Filter range based of cell based on another range
    By Dieneces in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2011, 02:53 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