I would enter the formula =SUBTOTAL(9,C1:C3) in cell C4. Let’s say that I want a subtotal in cell C4 that adds up the 3 cells above it. The beauty of the SUBTOTAL function is that you can add up the whole column and it will ignore the other SUBTOTALS that finds. Another common approach is to write a formula that points to each monthly total and adds them up. But if you try to do that for the year you will end up totaling both the invoices and the monthly totals, unless you move the monthly totals to a separate column. If we had used the Average function in our subtotals, the formula in the Conditional Formatting box would have looked like =RIGHT($C1,7)=”Average”.įind out more about our Microsoft Excel training Sydney, Australia.įind out more about our Microsoft Excel training London, UK, or our Microsoft Excel training Dorset, Hampshire, Wiltshire area.If you have a list of invoices in Excel, and you want that list to show a total for each month and for the year, most people would use the SUM function to total each month. The RIGHT function selects the rightmost xxx characters in a string, where xxx is the second argument in the function. The subtotal rows were formatted accordingly. On the font tab, we selected Bold and on the Fill tab, we selected a background colour. The formula we typed in was =RIGHT($C1,5)=”Count”. We then clicked Use a formula to determine which cells to format. We selected the data area including the subtotals, then went to the Home tab and in the Styles group, from the Conditional Formatting dropdown, selected New Rule. In the example below, I have created subtotals based on a count of how many of each product have been ordered. The workbook we were using had Counts for the subtotal. I was demonstrating subtotals to a client today and she wanted to know how to format all the subtotal rows in bold with a different background cell colour.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |