How to make a running tally based off other cells' color (or cell values)

respawn

New Member
Joined
Oct 27, 2017
Messages
5
I have a transaction worksheet I use to track some personal financials. I just want to have a running tally of the buys vs the sells. Something that will update on the fly when new data is added to the appropriate columns.
I read that I cant attach my sample data (as a worksheet) but am going to try the Mr.Excel HTML maker and paste below.

Basically, I want all the totals (column H) for sells (which are red) to be totaled in L1. And all the totals (column H) that are Purchases (which are green) in N1. The Xfers (blue) will be ignored.

I already have the formula in each cell of column H:
=IF(ISNUMBER(SEARCH("Sell",J#)), F#-G#, F#+G#)

Where # is incrementally the row number. And this just simply determines if the total should be subtotal - fee (for a sale) or subtotal + fee (for a buy).

I tried to do a modification of the above to include a range, but the fact that the color/transaction type is variable was throwing me off. Any help would be appreciated. Let me know if any clarifications are needed.

Happy New Year!

Excel 2010
BCDEFGHIJKLMN
1TypeRef CodeAmountPriceSubtotalFeesTotalDatetransactionBuy Amt0Sell Amt0
2A123480000000.000000070.560.001120.5611212/25/2017Purchase
3C12351510000.000020003.020.006043.0260412/25/2017Purchase
4A123680000000.000000141.120.002241.1177612/26/2017Sell
5B123768490580.860.000000010.68490580.001369810.6862756112/26/2017Purchase
6A123848000000.000000090.4320.0008640.43286412/26/2017Purchase
7A123948000000.000000140.6720.0013440.67065612/26/2017Sell
8B12403.947402915.602915.612/27/2017Xfer
9A1241461416000.000000104.614160.009228324.6233883212/27/2017Purchase
10B1242100.016530000.16530200012/30/2017Purchase
11C12430.16531258020000200012/30/2017Xfer
12C12443.01620560.054694570.164970060.000329940.165312/30/2017Purchase
13C1245405850.000014000.568190.001136380.5693263812/30/2017Purchase
14D1246200000.000048100.9620.0019240.96392412/30/2017Purchase
15D1247200000.000054001.079999990.002159991.0778412/30/2017Sell
16A124819265232.80.00000011.926523280.003853041.9226702412/31/2017Sell
17A12493534486.930.00000010.353448690.000706890.352741812/31/2017Sell

<tbody>
</tbody>
X

In the example above, the yellow cell L1 would be 2011.028238 and N1 would be 5.14166804.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
wouldn't this just be as simple as this?:

Cell L1 : =SUMIF(J2:J17,"Purchase",H2:H17)
Cell N1: =SUMIF(J2:J17,"Sell",H2:H17)

Or am I missing something?
 
Upvote 0
wouldn't this just be as simple as this?:

Cell L1 : =SUMIF(J2:J17,"Purchase",H2:H17)
Cell N1: =SUMIF(J2:J17,"Sell",H2:H17)

Or am I missing something?

Nope, that's perfect!! I thought it would be something "simple" just couldn't get it working. SUMIF, have to remember to use that more. Thanks a million!! =)
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top