Link to home
Start Free TrialLog in
Avatar of simon
simon

asked on

Adding Record and Expenses tab for Keno Workbook

Requirements :  File attached  RecordNExp tabs Keno.xlsx

In Record tab, I will be inputting data manually.

Column A  = Date

Column B  = Day

Column C:L/ Row 2   =  Numbers drawn 1 to 10

Column N = I will manually input spend

Column O = I will manually input win


Now Column N and O should automatically update (sync) spend and win column of record tab to the  expenses tab.

 

Update button needed to update input of spend and win tabs for sync to work between record and expenses tab.

Other buttons needed  are  Add Month and Clear all


In Record tab , currently there are only two rows of  draws for each date, but if I play more than two draws then would need an option to type the third row in that date.







 

 

Avatar of Martin Liss
Martin Liss
Flag of United States of America image

I assume you want this added to your current keno workbook. If so then please attach that workbook here. Also please attach your latest lotto workbook.
Avatar of simon
simon

ASKER

keno workbook attached   29243609e.xlsb

latest updated lotto workbook  attached  :  29240392c (1)lotto workbooktill27July.xlsm
Thanks. I solved the tricky manual draws problem. Now please remind me of what you do in the lotto workbook for the Record and Expenses tabs.

Also:
  • Why is column D in the Expenses tab blank?
  • Is "Income" column E minus column F?
  • Is "Total Win" the sum of column G?
  • Why are the question marks in Total Spend($?) And Total  Spend($?)
Test the addition of manual draws, close the workbook without saving and let me know if there were any problems.

Regardless of that outcome, when you reopen the workbook please test the Record and Expenses processing. A lot of code was added so I'm sure there are things wrong; let me know what they are.
29243858.xlsb
Avatar of simon

ASKER

Why is column D in the Expenses tab blank 


Keno spend column would come under a single column.  I was trying to merge two cells, but don't know what happened there . So column D can be deleted
Avatar of simon

ASKER

  • Is "Income" column E minus column F?

yes
Avatar of simon

ASKER

  • Is "Total Win" the sum of column G?

yes 
Avatar of simon

ASKER

  • Why are the question marks in Total Spend($?) And Total  Spend($?)

Because there is no value at the moment, since there is no data coming from the Record tab
You can Format cells->alignment->horizontal->center across selection instead.
Avatar of simon

ASKER

thanks
Avatar of simon

ASKER

could you kindly delete column D  of the expenses tab
I will but I'm hoping you can test the way it is and ignore the fact that there's a blank column.
Avatar of simon

ASKER

I tested the manual draws input for 28 and 29th July and it worked correctly . Hopefully I will never have to tamper with time sequence .
Avatar of simon

ASKER

A lot of code was added so I'm sure there are things wrong; let me know what they are. 

I entered data manually in the Record tab  in below picture


User generated image

And a run time error popped up when update results button was pressed
User generated image
So I could see not see the outcome in the expenses tab, because of the runtime error
Avatar of simon

ASKER

I will but I'm hoping you can test the way it is and ignore the fact that there's a blank column. 

ok . run time error info is  in the previous post
Okay. Please suspend testing until I've updated the workbook.
On the Record tab should there be 1 row per day or 4 rows per day? If the latter do you want me to insert a new column after the "Day" column for the "Time"?
Avatar of simon

ASKER

Yes 4 rows is fine. But what if I play 3 draws for 10 am instead of 1 draw, Will I able to create a blank row for the extra 2 draws typed and hoping that would still give me a correct update in the expenses tab.

Yes you can add time column after day
Yes 4 rows is fine. But what if I play 3 draws for 10 am instead of 1 draw.
What did we do in the lotto workbook?
Avatar of simon

ASKER

What did we do in the lotto workbook? 

It was similar, where I could add more lines.  I had to manually create a blank row below the last typed row.

And the update results picked up the extra row and updated the expenses tab correctly


Avatar of simon

ASKER

While you are fixing the run time error, wanted to also mention  to provide an option to add a date button, along with the Add Month which is already provided.
Avatar of simon

ASKER

Just was wondering as a part of  Record and Expenses, can I ask the following in this question or do I have to post a new question for the same.

The continuity question was the one in below picture
User generated image
A request to make was to  title the M column to " Draws Played"  

For example , if I spent $2 for Row 5 , then Spend Column N5 would automatically display 2,
and if I spent $1 in Row 6,   then Spend Column N5 should now display "3"
because Row 5 + Row 6 =  $3 and hence N5 displays 3 ($ sign not required as it is understood it is cash spend)

In below picture,  I would wish to set a Spend Limit in Cell N65 = 124.
So $124 is my spend limit.   But in the future or next if I want to change the spend limit to 150, that should be possible.
In above picture total spend was Row 5 = 3 and Row 9 = 4,   so 3+4 = 7.

So now limit spend N65 which was $124,  now should reduce to 117
Calculation is  $124 - $ 7 = $117 and 117 should display in N65.
User generated image

User generated image
If the same spend limit be applied to lotto table


1)
provide an option to add a date button
How would that be used?

2) In the lotto workbook you were "charged" 70 cents for each draw played without a powerball and $1.50 for each powerball line. What is the cost per draws played in the keno workbook?

3) Also you are showing Spend and Win on the Record tab. Why is it there when the same information is on the Expenses tab? And if you really do want it on the Record tab, why don't we put the total line on the Record tab and get rid of the Expenses tab.

4) When is it a win?

5) Are you expecting to see colors in the Record tab? If so should the values be compared against the Monitored Numbers?
Avatar of simon

ASKER

provide an option to add a date button
How would that be used?

Suppose I start playing in the middle of the month, then would there be an option to add half a month. ?

Or let's say if I started playing ken on 29th July instead of 1st Aug 22, that is when I thought I might to add from and to date period.

The current way that you have done is Add Month.

But say if I started to play keno on 29th July 22,  would I be able to delete the dates from1st July to 28th July without upsetting the coding.

But if the coding does get affected , then I thought to also request a from and to date period where I can the date period that I want.



Avatar of simon

ASKER

What is the cost per draws played in the keno workbook? 


Each draw played cost $1 per draw.
Minimum spend $1  and Maximum spend is $100
So following is how it is paid out

Match your Keno numbers to the numbers drawn to see if you win. Your prize will depend on how many numbers you picked and how many numbers you matched in below picture

User generated image
Keno prize table attached  which is same as above  :  Keno prize table.xlsx
Avatar of simon

ASKER

3) Also you are showing Spend and Win on the Record tab. Why is it there when the same information is on the Expenses tab? And if you really do want it on the Record tab, why don't we put the total line on the Record tab and get rid of the Expenses tab. 

In Record tab,  there is a record of the number of lines played either 10 am , 1pm, 3pm and 6pm.

In 10 am draw , I could for example play 6 lines which needs 6 rows ,  then in 1 pm I might just play 1 line = 1 row.

Whereas in Expenses tab, this is how it  should look in below picture

User generated image
Also when I use my laptop it is just a 11inch screen, so having expenses tab separate helps to see the tab fully.


In below picture this is how it would look to reflect what is in record tab, because I played linees

User generated image


Avatar of simon

ASKER

 And if you really do want it on the Record tab, why don't we put the total line on the Record tab and get rid of the Expenses tab.

because laptop is 11 inch screen , would have to scroll back and forth.

Avatar of simon

ASKER

When is it a win?

For this I have to type,  in spend and win column manually and that would update the expenses column automatically with the update button on the record tab.

Avatar of simon

ASKER

5) Are you expecting to see colors in the Record tab? If so should the values be compared against the Monitored Numbers? 

Yes that would definitely help as I could use the same numbers in the future watching the record tab everyday.

Not sure against what it should be compared, but I can leave this to you and if I find it ok , then I will indicated that
But say if I started to play keno on 29th July 22,  would I be able to delete the dates from1st July to 28th July without upsetting the coding.
I believe that you don't need to do anything and only those rows with data get copied o the Expenses tab.
because laptop is 11 inch screen , would have to scroll back and forth.
Would being able to press Ctrl+Shift+B to go to the bottom and Ctrl+Shift+T to go to the top help?

Yes that would definitely help as I could use the same numbers in the future watching the record tab everyday.
In the lotto workbook I think we match against the WNR and if so I can do the same thing here.
Avatar of simon

ASKER

Would being able to press Ctrl+Shift+B to go to the bottom and Ctrl+Shift+T to go to the top help? 


It would have been a great help if there was a working keyboard shortcut to move scrollbar for the 1 to 80 tab, without the necessity of zoom in and zoom out

I tried the above  keyboard shortcut  for 1 to 80 tab, unfortunately the scrollbar did not move back or forth.
Neither did it go to the bottom or the top.
Avatar of simon

ASKER

In the lotto workbook I think we match against the WNR and if so I can do the same thing here 

As long as color highlights can be displayed that should be fine.
Avatar of simon

ASKER

I believe that you don't need to do anything and only those rows with data get copied o the Expenses tab. 

I am happy with that then.
I don't think that my idea to have totals at the bottom of rhe record tab is practical so lets forget about that. I'd also like to forget about my idea of including the times.
Avatar of simon

ASKER

I don't think that my idea to have totals at the bottom of rhe record tab is practical so lets forget about that. I'd also like to forget about my idea of including the times. 

Which of your previous comments were you referring to for the above ideas
It's already a long thread so let's forget about that for now.
This has been a very large effort and I'm not done yet. Because of that I'd like to put off implementing a spending limit until the next question.

I added the Prize Table tab as a hidden worksheet.

To add a second line for a particular date in the Record tab, double-click the date that you want to duplicate.

Other than a spending limit I know that some things are missing, but please tell me what you feel is missing.
29243858a.xlsb
Avatar of simon

ASKER

Before checking the workbook for record and expenses,  first thing I wanted to do was update the workbook,.

I updated the workbook successfully to 31 July 22
update file name  :  e4f42e38-1110-11ed-87f0-005056819165

After updating the file till 31st July, I had to manually update to  1st Aug and 2nd Aug.

I clicked By day and got option to enter 2 days (1st Aug and 2nd Aug) worth of draws.
I entered all draws for 1st Aug and only 10am for 2nd Aug and deleted 1 pm , 3pm and 6 pm as they are not drawn yet and then I hit on add draws, but I got a message, but the message will not go away till it is corrected.  So not sure what I did not do correctly. ?

So the manual draws are not updating in below picture, is there any step I may have done differently for not being able to add draws.


User generated image
The code assumes that all the rows to the last row (in this case row 10) are filled and it is saying that the date in row 6 is later than the blank date in row 5. If you delete rows 3 to 5 it should allow you to add those draws providing everything else is valid.

But you should not be adding anything less than a full day when you choose By Day. Instead you should use By Draw.
Avatar of simon

ASKER

But you should not be adding anything less than a full day when you choose By Day. Instead you should use By Draw. 

I clicked on Add by day, because it  displayed 8 draws in one go for 1st and 2nd Aug.


Avatar of simon

ASKER

ok so I did it by draw and got option to enter 4 draws and entered data and then clicked on add draw,

then clicked again by draw and selected 1 draw and that was ok.

so this way it is all good . thanks.

Now I am still trying to understand the Record and Expenses workings, so will take some time to figure out .
Avatar of simon

ASKER

In below picture I got an error in Record tab.

User generated image
Avatar of simon

ASKER

In below picture,  in Row 8 I typed 5 numbers and entered 1  and win amount 2 and updated results worked correctly.

User generated image
After this I typed  6 numbers in row 65 in below picture
User generated image
and then tried to update the results, but when trying to update got a run time error  91

and everything got deleted in below picture  while trying to update and looks this in below after trying to update
User generated image
Also there are row spaces between spaces in expenses tab.  

Blank rows in Record tab is fine for purpose of entering data , but  I was hoping to have no blank rows in the expenses tab in above picture.  Can the Expenses tab be made  to look like below picture without blank rows

User generated image


Double-clicking the date wasn't working properly which eventually caused the Object error.

Also if you look at the Expenses tab you'll see it's a lot better.
29243858b.xlsb
Avatar of simon

ASKER

User generated image
so I typed 6 numbers in row 64 and clicked on update results, but the expenses tab did not update.

The expenses tab looks like the one in below  picture without the 31st July update.
Not sure where did the  31st July update go ? I see only upto 7th July

User generated image
Please attach that workbook.
Avatar of simon

ASKER

So I tried it , but on on clicking update results in record tab, it did not update $40 in expenses tab for 31st July , it shows the same in below picture
User generated image
How is the $40 arrived at? I see $40 in cell O64 on the Records tab but you picked 6 balls and matched one and according to the Prize Table you need 5 matches to get the $40 prize,
Avatar of simon

ASKER


User generated image
The 3 pm draw of 31st July  in above picture shows 5 of the 6 balls matched which  is    2 6 9 11 15 22, except for 22.

so 2 6 9 11 15   matched the 3 pm draw, hence as per the prize table , the win is $40 in 064

Therefore the expenses tab should update $40 win.
Okay, one of my suggestions was that I add the time to the Record and Expenses tab, otherwise I can't tell that the 6 balls you chose were from the 3 PM draw.
Avatar of simon

ASKER

Okay, one of my suggestions was that I add the time to the Record and Expenses tab, 

Adding the time to the Record tab is fine,  but if you are able to merge the update in expenses tab date would be good if that was possible 

Avatar of simon

ASKER

I am happy with your suggestion of adding time to the Record tab.
It's already doing that (the two 3-Jul lines).

Why do you need columns N and O on the Record tab? The Expenses does it's own calculation.

Why do you need column M?
Avatar of simon

ASKER

Why do you need columns N and O on the Record tab?  

ok I agree  with you on this one .  I  would have to view the spend and win in Expenses tab then.

But in saying that I was going to ask you add a spend limit  at the bottom of each month.

So that was the reason for spend and win tab.   Unless you are able to add a spend limit directly in expenses tab
Avatar of simon

ASKER

It's already doing that (the two 3-Jul lines). 

I can see it is doing the merge in expenses tab that is great
Avatar of simon

ASKER

So how is the $40 update going to work now ?
It will calculated in the Profit column just like the $250,000 is now.
Avatar of simon

ASKER

The Expenses does it's own calculation. 

So what is the reason the $40 is not getting updated in the expenses tab for 31st July.

That is when you suggested to add the time to the record tab to fix it.
The $40 didn't get updated because I wasn't matching the numbers against the correct 31-Jul time.
Avatar of simon

ASKER

Would you be adding time to fix it ?
Avatar of simon

ASKER

ok
I added a 'Go to Date' button to the Record Tab so that you don't necessarily need to scroll the Record tab up and down.  For example if you have the month of July in the Record tab and you click the Go to date button and choose 31-Jul-22 and then click OK, you will be taken there, and if you click the button again and choose 10-Jul-22  and click Ok you will be taken there.
29243858d.xlsb
Avatar of simon

ASKER

Brilliant job so far what you done for the Record tab. However I am not sure if there is an issue or the way I entered data. This is how the expenses tab looks in below picture
User generated image

But after entering data on the 10th of July, all the manually entered draws in Record tab got deleted, while the one that you entered has remained, so not sure what happened there
All the data in the expenses tab got deleted as well in below picture

User generated image

So I wish to have the manually entered draws in Record tab to remain and not get deleted, but at the moment whatever I entered in the Record tab is getting deleted.

Also the new data in the expenses is getting overwritten, meaning the previous information is deleted to replace the new information,  that has happened in below picture
User generated imageAbove I can see data only from10 July 22 only , all the previous ones are wiped out. Not sure why.

Avatar of simon

ASKER

Data which I had typed in the record tab for 10th July 22  has gone blank in below picture when clicking update results in record tab
User generated image
But after entering data on the 10th of July, all the manually entered draws in Record tab got deleted, while the one that you entered has remained, so not sure what happened there
I will look into that.

Also the new data in the expenses is getting overwritten, meaning the previous information is deleted to replace the new information,
That's by design. Each time the Update Results is clicked everything in the Expenses tab is replaced by the information in the Record tab.
I believe it's correct now.
29243858e.xlsb
Avatar of simon

ASKER

Update missed data transfer from Prize table

Yes the record tab is now able to retain data,

However I typed 5 numbers for 10am draw  2, 6, 16 , 18 , 21
User generated image
 
and 2, 6, 16 matched and the payout for 3 out of 5 matched is $2.

However  Update button did not transfer $2 in Profit column Cell E3,   so E3 stayed blank instead of populating it with 2
User generated image




2 doesn't match the 10 AM draw for July 1 so only two out of five were matched and there is no prize for that.
Avatar of simon

ASKER

yes you are right sorry my mistake,  I typed those numbers in 1st July instead of 2nd July and that worked.

Run time error 91

I clicked on CLEAR ALL and start with a clean slate and chose Add Month and Added Aug 22,

After that I  typed number 3 in  6 pm draw for 1st Aug  and  3 is a match and so would have shown a profit of $2 , so I clicked update results button to update expenses tab , but instead I got a run time error 91 in below picture
User generated image



Did you download a keno workbook that contains August 1st?

Do you see anything wrong with me making a change that does not allow days to be added to the Record tab if they don't exist in the WNR?
Avatar of simon

ASKER

I did not download a workbook as there is no new workbook update yet.

But I typed manually  the draw results for 1st Aug 22 and updated the Main tab as in below picture till 1st Aug 22 i
User generated image
But I still get the error 91 ,  is it because the different tabs are not syncing to the manual update.?
I do remember when it is a downloaded workbook update , then that correctly syncs all the tabs to the latest date.

However WNR TAB still shows 31st July 22 in below picture, which could be the reason why error 91 shows up.
User generated image
While Monitor Groups in below picture shows till 18th July, but I know that this tab gets only updated to the latest draws only if it is a downloaded update.  Not sure why this tab does not pick up Manual draws update.

User generated image
So am I missing some steps here ?

So it seems the different tabs are not syncing to the same date of 1 Aug when doing a manual draw update.




The Update Results process looks in the WNR to determine how may hits there for the days with data in the Record tab. In your case you entered data for Aug 1st which doesn't exist in the WNR and that caused the error.
I made an adjustment to the code behind the Update Results button so that instead of experiencing an error you are notified that some draws could not be evaluated because their dates are more recent then the newest WNR date.
29243858f.xlsb
Avatar of simon

ASKER

I have done a manual update again for 1st Aug 22 for 4 draws.

Main tab and 1 to 80 got updated to 1st Aug 22,   but WNR tab did not get updated.

So is WNR tab solely dependent on the downloaded update  ?

Is it possible to make the Manual draws updater to also update the    WNR TAB ?

I do mistakes sometimes by typing one or two wrong numbers in the Manual Draws tab and unfortunately the WNR TAB might pick up those wrong numbers too.

So is that why you have not linked the Manual draws updater to update the WNR TAB. ?

Yes, currently the WNR tab is solely dependent on the downloaded update.

In a future question I could have the manually added draws show up in the WNR and if you make a mistake you can edit the WNR.

So is that why you have not linked the Manual draws updater to update the WNR TAB. ?
No, I just didn't know it was a requirement.
Avatar of simon

ASKER

In a future question I could have the manually added draws show up in the WNR and if you make a mistake you can edit the WNR 

The typing mistakes that I do  while entering in the manual tab are ,  typing the same number twice or typing a different number that was not in the declared results or missing a cell.

Would your code be able to pick that up in the Manual tab itself and alert me about that.? as a pop up

As I am worried that updating the WNR Tab if I made a mistake here as well would affect the update globally meaning all the tabs that are dependent on the update

User generated image
The dates in your picture of the Record tab are from July and not June.
Avatar of simon

ASKER

I know I already deleted the comment. my apologies
Avatar of simon

ASKER

Would your code be able to pick that up in the Manual tab itself and alert me about that.? as a pop up 

My question was focussed on the previous comment as above ,  can you code pick up my typing error in the Manual itself and alert me as a pop up so I can correct it in the Manual tab itself ?
That's OK. I wouldn't have seen the comment except that I have some moderator powers, one of which is the ability to see deleted comments.
It depends on the type of the error. When you do make a mistake what does it normally entail?
Avatar of simon

ASKER

sometimes I have noticed  in the Manual Draws tab, that  I occasionally type a wrong number to what is on the declared results on the lotto website or also a duplicate number,  I have also missed a cell completely and try to click on Add draws and if the wrong typed  update gets through all the tabs, it is going to be a disaster for me
I can't do anything about a wrong number because the code doesn't know the right ones. I can however validate for duplicate and missing numbers. I think I did that way back when but they turned out to be problematic so I abandoned them, but I'm will too try again.
Avatar of simon

ASKER

I can't do anything about a wrong number because the code doesn't know the right ones. \

I thought so.

 I can however validate for duplicate and missing numbers.  
That would be good.    But if you think it is problematic when you actually have to try it do let me know
But if you think it is problematic when you actually have to try it do let me know
In your next question add that as a requirement.
Avatar of simon

ASKER

 
The final question I have on the current question is , since I have not been able to test the 1st Aug draw because the the lotto website update for latest draw is not available. Would  I get to see the  this row under each month in below picture , which is what I wanted .

User generated image


Would  I get to see the  this row under each month, which is what I wanted .
Im not sure what that means.
Avatar of simon

ASKER

Would  I get to see the  this row under each month, which is what I wanted .
Im not sure what that means. 

Totals row as below should be visible under every month like below picture is for July 22


User generated image

Row  10 showing keno spend, profit, loss, income
User generated image
Are you saying the when you eventually Add Month of August that you still want to see the July figures in the Expenses tab?
Avatar of simon

ASKER

Are you saying the when you eventually Add Month of August that you still want to see the July figures in the Expenses tab? 

No that row is for July 22 only and do not wish to mix up.

But for Aug 22 , it should have that row for Aug only  below the month



Avatar of simon

ASKER

spend , profit, loss and income row  at the bottom of each month 

I have been struggling to test the Aug Month as  there is no new download update.

So  I used the following method to find out if the  Row(spend, profit, loss and income)  under each month in Expenses tab  gets displayed  or not.

So I used clear all button and then added June month and July month and then tested it and realised that the spend, profit , loss and income are already getting merged in one row.  At this point, I wish to see the merged row  separately, maybe in the J K L and M columns.

But I wish to see the spend , profit, loss and income row  at the bottom of each month which is not happening at the moment.   The reason I need this row under each month is because I when request you to add a spend limit , then that would be visible  for each month along with the ROW of spend, profit, loss and income





ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of simon

ASKER

ok