+ Reply to Thread
Results 1 to 5 of 5

Working with Variables

  1. #1
    Registered User
    Join Date
    02-21-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Working with Variables

    I'm working on an algorithm/calculator that jumps between pages. I'm not at the beginner level, but I'm not sure how far along the intermediate I stand. I'm fairly good at understanding and applying code or modifying formulas, but I just have to learn what possibilities exist first before doing so (to give an example; I used a dragged out method to write out some formulas in the past until I learned about the IF( command. Now I'm comfortable enough with several If statements within the same cell).

    So, to give you an idea of what I'm working on:

    Column 1 has the date, not used in calculation
    Column 2 has the name, not used in calculation
    Column 3 has the % done, first step in calculation
    Column 4 has the % necessary, second step in calculation

    Column 5 has the % checker, >=.7 is considered valid. So if the value in Column 4 is >=.7, it prints 1.

    Column 6 is the classifier, user must input "A" "B" "C" or "D"

    Now what what I need to do is to find a way to automate the following process:
    If Column 5=1 and Column 6 = "A", then add to total count of "A"
    If Column 5=1 and Column 6 = "B", then add to total count of "B"
    If Column 5=1 and Column 6 = "C", then add to total count of "C"
    If Column 5=1 and Column 6 = "D", then add to total count of "D"

    I've already used a dragged out solution that gets the job done:
    Column 7 checks if Column 6 is A and if Column 5 is 1, if A then 1, if not then nothing
    Column 7 checks if Column 6 is B and if Column 5 is 1, if B then 1, if not then nothing
    Column 7 checks if Column 6 is C and if Column 5 is 1, if C then 1, if not then nothing
    Column 7 checks if Column 6 is D and if Column 5 is 1, if D then 1, if not then nothing

    All of these values are then added to their respective total via a sum format.
    Last edited by Tim S; 02-21-2011 at 05:30 PM. Reason: Added a condition, added a clarification

  2. #2
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Working with Variables

    Welcome Tim,
    maybe try the SUMIF for the first group?

    If Column 5=1 and Column 6 = "A", then add to total count of "A"
    If Column 5=1 and Column 6 = "B", then add to total count of "B"
    If Column 5=1 and Column 6 = "C", then add to total count of "C"
    If Column 5=1 and Column 6 = "D", then add to total count of "D"
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  3. #3
    Registered User
    Join Date
    02-21-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Working with Variables

    Let's see...

    =SUMIF(Column5,A,???)

    How can I add the "A"s together? Wouldn't I have to convert them to a value of 1 first?

    EDIT--

    I tried out the following:

    =SUMIF(O:O,"A",IF("A",1,""))

    I got a #VALUE! error
    Last edited by Tim S; 02-21-2011 at 05:58 PM. Reason: Tried to implement formula

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Working with Variables

    Can you post a working sample file(take out any sensitive data or information before attaching the sample).
    I'm sure someone here can figure something out for you.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Working with Variables

    How about for the A count;
    =SUMPRODUCT(--($E$2:$E$1000 = 1),--($F$2:$F$1000= "A"))
    modify the "1000" to accomidate your range. Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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