How to combine column data with same category (similar to tags) together

Tuckebarry

New Member
Joined
Aug 14, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hey everyone, I'm creating a trading journal to analyze my performance of different strategies. However, there are times where a trade may have multiple different strategies in play. For example, 'Earnings Play' + 'Oversold' + 'Breakout'. I'd like to create graphs to compare the performance of these strategies, but how could I make Excel consider them together. Right now I listed the headers as 'Strategy 1', 'Strategy 2', 'Strategy 3' although this doesn't combine it.

Strategy Headers on Excel.png

^That's how my spreadsheet looks like right now, but it won't combine the data together.

Strategy Graph.png

^^That's how it should look when all strategies are combined^^

Thank you so much in advance for your help!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If I were you I would insert two helper columns. Let say the first helper column address is R. R4 formula will be:
Excel Formula:
=INDIRECT(TEXT(MIN(IF(($H$4:$L$25<>"")*(COUNTIF($R3$1:R3,$H$4:$L$25)=0),ROW($4:$25)*100+COLUMN($H:$L),7^8)),"R0C00"),)&""
Drag it down as many as strategies you have.
A few things about this formula:
It uses INDIRECT function which is not recommended. It is a volatile function that will cause worksheet to recalculate whenever you open or change the file. I am sure there is a more efficient way to achieve this in Oficce 365.
Let say your second helper column is S. S4 formula will be:
Excel Formula:
=SUMPRODUCT(--(((H$4:H$25=R4)+(I$4:I$25=R4)+(J$4:J$25=R4)+(K$4:K$25=R4))>0),(amount_column)*(quantity_column))
Then you can draw the desired graph by using these two columns.
 
Upvote 0
If I were you I would insert two helper columns. Let say the first helper column address is R. R4 formula will be:
Excel Formula:
=INDIRECT(TEXT(MIN(IF(($H$4:$L$25<>"")*(COUNTIF($R3$1:R3,$H$4:$L$25)=0),ROW($4:$25)*100+COLUMN($H:$L),7^8)),"R0C00"),)&""
Drag it down as many as strategies you have.
A few things about this formula:
It uses INDIRECT function which is not recommended. It is a volatile function that will cause worksheet to recalculate whenever you open or change the file. I am sure there is a more efficient way to achieve this in Oficce 365.
Let say your second helper column is S. S4 formula will be:
Excel Formula:
=SUMPRODUCT(--(((H$4:H$25=R4)+(I$4:I$25=R4)+(J$4:J$25=R4)+(K$4:K$25=R4))>0),(amount_column)*(quantity_column))
Then you can draw the desired graph by using these two columns.

Thanks a lot for taking the time to answer! Honestly at this point I think I'm going to just create a separate sheet with all the strategies and calculate the stats individually.

I really appreciate it though, thank you so much!
 
Upvote 0
Yes, that would be a much simplier solution than what I suggested. Thaks for the response 👍
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: How to combine column data with same category (similar to tags) together
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,215,167
Messages
6,123,401
Members
449,098
Latest member
ArturS75

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