Extract information out of a cell.

Ramballah

Active Member
Joined
Sep 25, 2018
Messages
334
Office Version
  1. 365
Platform
  1. Windows
Well hello everyone...
I have posted this before, but since i got no replies or help, i thought i would repost it and ask it a bit differently or something.
So i have an sheet where i want to keep track of my coinflips.. But to make life easy i want to just write down simple things and then excel has to extract the information from that cell
into my charts
in the end it has to look something like this:

[TABLE="class: cms_table"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]Number[/TD]
[TD]Winstreak[/TD]
[TD]Amount BET[/TD]
[TD]Whats bet on[/TD]
[TD]Win/Lose[/TD]
[TD]What the coin landed on[/TD]
[TD]Profits[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]50 t[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]1[/TD]
[TD]-[/TD]
[TD="align: right"]50[/TD]
[TD]Tails[/TD]
[TD]Lose[/TD]
[TD]Heads[/TD]
[TD]$ -50[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]5 h[/TD]
[TD]win[/TD]
[TD]shee[/TD]
[TD="align: right"]2[/TD]
[TD]-[/TD]
[TD="align: right"]5[/TD]
[TD]Heads[/TD]
[TD]Win[/TD]
[TD]Heads[/TD]
[TD]-[/TD]
[TD]Shee[/TD]
[/TR]
[TR]
[TD]50 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]50[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 50[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]50 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]50[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 50[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]600 h[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]600[/TD]
[TD]Heads[/TD]
[TD]Win[/TD]
[TD]Heads[/TD]
[TD]$ 600[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]50 t[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]6[/TD]
[TD]-[/TD]
[TD="align: right"]50[/TD]
[TD]Tails[/TD]
[TD]Lose[/TD]
[TD]Heads[/TD]
[TD]$ -50[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]250 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]250[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 250[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]500 h[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]8[/TD]
[TD]-[/TD]
[TD="align: right"]500[/TD]
[TD]Heads[/TD]
[TD]Lose[/TD]
[TD]Tails[/TD]
[TD]$ -500[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]500 h[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]9[/TD]
[TD]-[/TD]
[TD="align: right"]500[/TD]
[TD]Heads[/TD]
[TD]Lose[/TD]
[TD]Tails[/TD]
[TD]$ -500[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]1000 h[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]10[/TD]
[TD]-[/TD]
[TD="align: right"]1000[/TD]
[TD]Heads[/TD]
[TD]Lose[/TD]
[TD]Tails[/TD]
[TD]$ -1,000[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]1500 h[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]11[/TD]
[TD]-[/TD]
[TD="align: right"]1500[/TD]
[TD]Heads[/TD]
[TD]Lose[/TD]
[TD]Tails[/TD]
[TD]$ -1,500[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]319 h[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]319[/TD]
[TD]Heads[/TD]
[TD]Win[/TD]
[TD]Heads[/TD]
[TD]$ 319[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]100[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 100[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 100[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]200 h[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]200[/TD]
[TD]Heads[/TD]
[TD]Win[/TD]
[TD]Heads[/TD]
[TD]$ 200[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]200 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]200[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 200[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 h[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]100[/TD]
[TD]Heads[/TD]
[TD]Win[/TD]
[TD]Heads[/TD]
[TD]$ 100[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]73 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]73[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 73[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]100[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 100[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 h[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]100[/TD]
[TD]Heads[/TD]
[TD]Win[/TD]
[TD]Heads[/TD]
[TD]$ 100[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 t[/TD]
[TD]win[/TD]
[TD]me[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]100[/TD]
[TD]Tails[/TD]
[TD]Win[/TD]
[TD]Tails[/TD]
[TD]$ 100[/TD]
[TD]Me[/TD]
[/TR]
[TR]
[TD]100 t[/TD]
[TD]lose[/TD]
[TD]me[/TD]
[TD="align: right"]22[/TD]
[TD]-[/TD]
[TD="align: right"]100[/TD]
[TD]Tails[/TD]
[TD]Lose[/TD]
[TD]Heads[/TD]
[TD]$ -100[/TD]
[TD]Me[/TD]
[/TR]
</tbody>[/TABLE]
As you can see, on the left I put in 100 t lose me for example
meaning, i bet 100$ on tails but i lost, and i was the one doing it. (sometimes there are other people also coinflipping)
Now i need this simplified information to be put in the charts, and then with formulas i can probably figure out the rest.
And also if its not to hard to do, is it possible to have it at 1 cell where i type my simplified info, then it gets put into the charts and cleans the cell where i put in my info? so i dont have to go over 4000 lines for example.
i hope i cleared my question from my previous post.
I'm not sure how the rules work if its allowed but i will put the link of my previous post here
https://www.mrexcel.com/forum/excel-questions/1098440-coinflipping-charts.html

Yours sincerely,
Ramballah
[TABLE="class: cms_table"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
I have tried to use this code, but the moment i type in my 100 t for example i get an error: Compile error: Expected End Sub
the last End If is marked in blue so i can retype it and this is marked in yellow:[TABLE="class: cms_table"]
<tbody>[TR]
[TD]Private Sub Worksheet_Change(ByVal Target As Range)[/TD]
[/TR]
</tbody>[/TABLE]

*Edit* It is whenever i make anychange to the worksheet, no matter which cell it is but if i change the contents i will get this error
You did not copy all of the code I posted (see the vertical scroll bar... it means there is more text below the bottom of the display). I don't know where those extra line feeds came from, but they pushed the "End Sub" statement below the visible part of the screen. Just add "End Sub" (without the quotes) at the end of the code you copied and all should be well.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Ahh thanks now everything is perfect :d
Also it is quite laggy now? or is it me?
 
Last edited:
Upvote 0
Ahh thanks now everything is perfect :d
Also it is quite laggy now? or is it me?

The code is not doing all that much so it should not be laggy (it is not laggy for me on my copy of XL2010).

One note... the code currently put the minus sign for losses on the left of the $ sign; however, an earlier post by you showed the minus sign for losses on the left of the number (to the right of the $ sign). If you would like this display format, change this line of code...

Cells(Rw, "G").NumberFormat = "\$ 0"

to this...

Cells(Rw, "G").NumberFormat = "\$ 0;\$ -0"
 
Upvote 0
The code is not doing all that much so it should not be laggy (it is not laggy for me on my copy of XL2010).

One note... the code currently put the minus sign for losses on the left of the $ sign; however, an earlier post by you showed the minus sign for losses on the left of the number (to the right of the $ sign). If you would like this display format, change this line of code...

Cells(Rw, "G").NumberFormat = "\$ 0"

to this...

Cells(Rw, "G").NumberFormat = "\$ 0;\$ -0"
Thanks alot, somehow when i editted it to the new format, it stopped lagging. Thanks alot ur the best!
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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