Extract information out of a cell.

Ramballah

Active Member
Joined
Sep 25, 2018
Messages
311
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:

NumberWinstreakAmount BETWhats bet onWin/LoseWhat the coin landed onProfitsPerson
50 tloseme1-50TailsLoseHeads$ -50Me
5 hwinshee2-5HeadsWinHeads-Shee
50 twinme3150TailsWinTails$ 50Me
50 twinme4250TailsWinTails$ 50Me
600 hwinme53600HeadsWinHeads$ 600Me
50 tloseme6-50TailsLoseHeads$ -50Me
250 twinme71250TailsWinTails$ 250Me
500 hloseme8-500HeadsLoseTails$ -500Me
500 hloseme9-500HeadsLoseTails$ -500Me
1000 hloseme10-1000HeadsLoseTails$ -1,000Me
1500 hloseme11-1500HeadsLoseTails$ -1,500Me
319 hwinme121319HeadsWinHeads$ 319Me
100 twinme132100TailsWinTails$ 100Me
100 twinme143100TailsWinTails$ 100Me
200 hwinme154200HeadsWinHeads$ 200Me
200 twinme165200TailsWinTails$ 200Me
100 hwinme176100HeadsWinHeads$ 100Me
73 twinme18773TailsWinTails$ 73Me
100 twinme198100TailsWinTails$ 100Me
100 hwinme209100HeadsWinHeads$ 100Me
100 twinme2110100TailsWinTails$ 100Me
100 tloseme22-100TailsLoseHeads$ -100Me

<tbody>
</tbody>
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

<tbody>
</tbody>
 
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:
Private Sub Worksheet_Change(ByVal Target As Range)

<tbody>
</tbody>

*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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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,217,381
Messages
6,136,228
Members
450,000
Latest member
jgp19

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