Trying to select, subtotal, and color selected cells from a column into categories with subtotals

%3CLINGO-SUB%20id%3D%22lingo-sub-1438836%22%20slang%3D%22en-US%22%3ETrying%20to%20select%2C%20subtotal%2C%20and%20color%20selected%20cells%20from%20a%20column%20into%20categories%20with%20subtotals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1438836%22%20slang%3D%22en-US%22%3E%3CP%3ELet%20me%20start%20with%2C%20%22I'm%20sorry%20I%20don't%20know%20how%20to%20ask%20for%20what%20I%20am%20trying%20to%20do%22.%20%26nbsp%3BThat%20said%2C%20here%20is%20what%20I%20am%20trying%20to%20do%20and%20I%20lack%20the%20experience%20to%20do%20it...%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20subtotal%20categories%20of%20expenses%20from%20columns%20of%20numbers.%20%26nbsp%3BI%20want%20to%20use%20different%20colors%20to%20identify%20which%20items%20are%20included%20into%20which%20subtotaled%20category.%20%26nbsp%3BI%20just%20need%20to%20be%20able%20to%20go%20through%20the%20column%2C%20mark%20each%20item%20by%20category%2C%20and%20need%20some%20way%20to%20indicate%20if%20the%20cell%20has%20already%20been%20included%20in%20another%20subtotal.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20simple%20way%20to%20take%20the%20list%20of%20cells%20in%20the%20formula%20and%20assign%20a%20color%20to%20them%3F%20%26nbsp%3BI%20want%20to%20be%20able%20to%20see%20if%20all%20cells%20have%20been%20used%20in%20the%20subtotals.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1438836%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1438888%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20select%2C%20subtotal%2C%20and%20color%20selected%20cells%20from%20a%20column%20into%20categories%20with%20subtotal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1438888%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F688403%22%20target%3D%22_blank%22%3E%40realst8%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20post%20a%20small%20example%20where%20you%20mock%20up%20about%20a%20dozen%20rows%20and%20explain%20the%20expected%20result%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20having%20trouble%20visualising%20what%20you%20want%20to%20achieve.%20If%20you%20subtotal%20by%20category%2C%20what%20formula%20do%20you%20use%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20create%20a%20pivot%20table%20and%20summarize%20data%20by%20category%2C%20all%20rows%20of%20the%20source%20will%20be%20included.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%2C%20please%20mock%20up%20a%20simplified%20example%20and%20we%20can%20take%20it%20from%20there.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1441243%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20select%2C%20subtotal%2C%20and%20color%20selected%20cells%20from%20a%20column%20into%20categories%20with%20subtotal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1441243%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7724%22%20target%3D%22_blank%22%3E%40Ingeborg%20Hawighorst%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20what%20I%20am%20working%20with.%20%26nbsp%3BI%20am%20sure%20this%20is%20very%20basic%20for%20most%20of%20you%20out%20there.%20%26nbsp%3BI%20am%20really%20just%20subtotaling%20a%20couple%20years%20worth%20of%20credit%20card%20statement%20so%20they%20can%20be%20input%20into%20quickbooks%20and%20just%20need%20a%20way%20to%20calculate%20the%20subtotals%20and%20somehow%20mark%20which%20cells%20have%20already%20been%20used.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJohn%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1441474%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20select%2C%20subtotal%2C%20and%20color%20selected%20cells%20from%20a%20column%20into%20categories%20with%20subtotal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1441474%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F688403%22%20target%3D%22_blank%22%3E%40realst8%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20formulas%20are%20constructed%20to%20address%20specific%20cells%20manually.%20That%20is%20of%20course%20very%20cumbersome%20and%20hard%20to%20maintain.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAn%20easier%20way%20is%20this%3A%20I%20suggest%20that%20you%20add%20a%20column%20to%20your%20data%20where%20you%20classify%20each%20entry.%20Let's%20say%20in%20column%20D%20you%20type%20words%20like%20meals%2C%20travel%2C%20rental%20car%2C%20materials%2C%20etc%20next%20to%20each%20number%20of%20column%20C.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20make%20sure%20the%20words%20are%20always%20spelled%20the%20same%2C%20look%20into%20Data%20Validation.%20You%20can%20use%20the%20list%20of%20entries%20in%20column%20E%20to%20create%20a%20data%20validation%20with%20a%20list%20of%20values.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20check%20if%20you%20have%20missed%20any%20entry%20this%20way%3A.%20Count%20the%20numbers%20in%20column%20C%20with%20%3DCount(C%3AC)%20and%20count%20the%20category%20text%20entries%20in%20column%20D%20with%20%3DCountA(D%3AD).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20you%20can%20either%20build%20a%20pivot%20table%20with%20the%20category%20names%20in%20the%20Rows%20and%20the%20numbers%20in%20the%20Values%20area.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOr%20you%20can%20use%20Sumif()%20functions.%20In%20your%20example%2C%20you%20could%20use%20this%20formula%20in%20cell%20F2%20and%20copy%20down%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSumif(D%3AD%2CE2%2CC%3AC)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20words%3A%20calculate%20the%20sum%20of%20all%20values%20in%20column%20C%20where%20column%20D%20has%20the%20same%20text%20as%20E2.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20put%20this%20into%20the%20attached%20file%20and%20randomly%20assigned%20some%20categories%20into%20column%20D.%20Change%20them%20to%20the%20correct%20ones.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%20me%20know%20if%20that%20works%20for%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Let me start with, "I'm sorry I don't know how to ask for what I am trying to do".  That said, here is what I am trying to do and I lack the experience to do it...

I am trying to subtotal categories of expenses from columns of numbers.  I want to use different colors to identify which items are included into which subtotaled category.  I just need to be able to go through the column, mark each item by category, and need some way to indicate if the cell has already been included in another subtotal.  

 

Is there a simple way to take the list of cells in the formula and assign a color to them?  I want to be able to see if all cells have been used in the subtotals.

3 Replies
Highlighted

Hi @realst8 

 

Can you post a small example where you mock up about a dozen rows and explain the expected result?

 

I'm having trouble visualising what you want to achieve. If you subtotal by category, what formula do you use? 

If you create a pivot table and summarize data by category, all rows of the source will be included.

 

So, please mock up a simplified example and we can take it from there.

 

Highlighted

@Ingeborg Hawighorst 

Here is what I am working with.  I am sure this is very basic for most of you out there.  I am really just subtotaling a couple years worth of credit card statement so they can be input into quickbooks and just need a way to calculate the subtotals and somehow mark which cells have already been used.

 

John

Highlighted

Hello @realst8 

 

Your formulas are constructed to address specific cells manually. That is of course very cumbersome and hard to maintain. 

 

An easier way is this: I suggest that you add a column to your data where you classify each entry. Let's say in column D you type words like meals, travel, rental car, materials, etc next to each number of column C. 

 

To make sure the words are always spelled the same, look into Data Validation. You can use the list of entries in column E to create a data validation with a list of values.

 

You can check if you have missed any entry this way:. Count the numbers in column C with =Count(C:C) and count the category text entries in column D with =CountA(D:D).

 

Now you can either build a pivot table with the category names in the Rows and the numbers in the Values area.

 

Or you can use Sumif() functions. In your example, you could use this formula in cell F2 and copy down:

 

=Sumif(D:D,E2,C:C)

 

In words: calculate the sum of all values in column C where column D has the same text as E2.

 

I've put this into the attached file and randomly assigned some categories into column D. Change them to the correct ones.

 

Let me know if that works for you.