+ Reply to Thread
Results 1 to 3 of 3

Sum of cells in a column depending on a value in another column

  1. #1
    Registered User
    Join Date
    03-30-2009
    Location
    Bear, De
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Sum of cells in a column depending on a value in another column

    Here is the setup:
    I have two sheets, the first being a form with some combo boxes and some fields that get populated depending on selections the user makes, and the second sheet holds the data.

    Now let me set up the data sheet:
    Lets say that the columns are username, state, and time on internet.

    Now here is the problem:
    I need to add up all the time all the users in a certain state were on the internet depending upon which state is selected on the first sheet.

    I accomplished doing all the individual username times for another part of the project using Vlookup. I think that to solve this new problem might require some scripting. I am uncertain how to proceed since I am not that familiar with VB scripting. I think I need to use a loop to search through column 2(state) for the specific state name and then add the value of column(3) time to a variable that can be updated every time through the loop. I am uncertain if this is the way to proceed. Can someone please give some guidance to this problem. Sorry to be a Noob, but I don't use excel that often.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Sum of cells in a column depending on a value in another column

    Perhaps you could post a workbook and explain in context?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-30-2009
    Location
    Bear, De
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Sum of cells in a column depending on a value in another column

    Sorry to speak in hypatheticals, but actual workbook has confidential client data. I will work on a small workbook to show how it is setup.

+ 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