macro help needed please - match value against a table

Frank

Member
Khanaran,
I am having difficulty understanding your problem. The Original match spreadsheet I uploaded used the table W2:AD16 to identify matches in column I, specifically I6:I65 which matched with any cells in the table M2:U16.

This identifying table W2:AD16 DOES update when you udate your results. It still looks at I6:I65 even though the contents have scrolled down one. This means that the yellow highlights in table M2:U16 (which refer to the other table) also updates and cells which were yellow before now reset to white background if there is now no match.

In the version you uploaded there appears to be yellow highlighting in certain cells in the table W2:AD16. This colouring has nothing to do with me. There is no conditional formatting in the table. You must have highlighted those. Why ? The table was just a construct to aid the other table colour scheme!

When you say "In the match sheet, when a number that was previously shaded is automatically deleted from the updating , it leaves they yellow shade can this be set so that it shades only if the cell contains value". I cannot understand what you are saying here. You need to specify a cell you think isnt working properly, in which table.


For the sorting problem, you need to know that there are 2 ways of sorting.

1. Each column independently of everything adjacent to it, as though the others were not there.
2. Sort all 3 columns as a group, which you select, then sort first by column 3 (your label), then by column 2, then by column 1


The first sort destroys the relationship between the three digits, whilst the second preserves each row of 3 digits but creates a descending order of ( a group of 3 digits).

I have written macros ( to be honest, recorded them ) for BOTH types of sort to show the difference.

For the first type of sort, Excel would try and link all adjacent columns by expanding the selected range, which you have to reject. (new) Macro 7

For the second type of sort I think Excel is quite user friendly, since it allows you to add levels of sort (in this case 3 levels) in which you set which column you are sorting by and whether ascending or descending. Macro 8

For both types of sort Ive left your numbering 1 to 0 out of the sort, so it remains the same.

You choose which you actually meant to use.

http://www.mediafire.com/file/ub4zcevpr2eqtpd/match%283%29.xlsm


Hi Frank



I further question if I may trouble you further..

Will it be possible to scan results and if either a 3,6 or 9 ball has been drawn, anticipate the a double digit draw inthe next or subsequent draw


Once again thank you for your help and guidance

Raj

Well you dont say how many results to scan ! I suppose just the latest would make sense. You dont say what you want to do when youve anticipated the double digit draw ( throw a party ?) or what double digits !

if you put formula :-

=IF(COUNTIF(D6:F6,"=3")+COUNTIF(D6:F6,"=6")+COUNTIF(D6:F6,"=9"),"Yes","") In cell G1 on the match sheet it flags up if either 3,6 or 9 are in the latest result. However I think you'll find a lot of your results will find such matches, so how useful is it ?

Please let me know about the highlighting problem.
 

Frank

Member
I'm having second thoughts about that sort, you shouldn't be losing track of the digit labels in the sort, so I'll need to take another look at that type 2 sort to carry the labels with them. I'll have another look in the morning,
 

Frank

Member
I found column U in table 4 confusing as it has no label. Eventually it dawned on me that it is the digit label to go with your heat scores in the other columns. So the previous sort type 1 I did threw these labels away, not much good. So in this version match(3b) each column takes the digit label with it and is included in the sort. There are still 2 sorts, this time the digit labels go with their data into the sort, so are in another order after the sort. I think this maybe what you were looking for.

The 2 buttons run macros macro8 and copyTsort respectively.


https://www.mediafire.com/?a6a2kbalcmv3bqt
 

khanaran

Member
Match3 table 5 and 6

I'm having second thoughts about that sort, you shouldn't be losing track of the digit labels in the sort, so I'll need to take another look at that type 2 sort to carry the labels with them. I'll have another look in the morning,
Hi

Thank you so much for pointing out and fixing the tables.

match3b is just perfect and solved my issues .

I apologise for the second table shading was my doing . I fixed that

Kind regards

Raj
 
Last edited:

khanaran

Member
Hi Frank

The highlighting problem was my mistake cleared it out.

The main purpose of the scan for 3,6 or 9 is to flag that a double number will appear within the next three draws to come I was looking at a skips table for the combined three balls and individual column. I am able to do so from top to bottom I would like to know if it can be displayed horizontal in place of vertically.

I will post a link to thee file soon

I
 

khanaran

Member
Link for the skips

Hi Frank

I am really grateful for all of your kind help in helping me learn as well. At 64 I am learning with excel than I everdid before.

Your simplicity is world class

I include here a link to a ski table

http://www.mediafire.com/file/swx26a6nb4r2ox2/pick3+skip+table.xlsm

The first macro which I got prepares skips using all three balls drawn..
will it be possible to modify the macro to do in addition skips for balls 1 2 and 3 separately as well.

My skips sheet is something I did from learning as well

Kind regards

Raj
 

Frank

Member
Raj,

Having looked at your sheet, firstly let me say that I dont like trying to follow other peoples macros and then modify them. Its too time consuming. Its not something I want to set a precedent for.

Secondly the golden rule is :- NEVER WRITE A MACRO WHEN FORMULAS WILL DO IT BETTER and/Or QUICKER. Sometimes you have to, for various reasons, but you don't need to here.
It was a good excercise for you, and it worked. Congratulations.

I was more intrigued with the other sheet, (sheet 1) where you have actually already created a skip table for (all 3 numbers as a group) and each individual number. However, it seemed a bit odd as it was counting backwards, getting the right skips but displaying the answer N draws back in time, wher N is the Skip. It should display the skip opposite the number it is counting the skip for. I have altered the formulas to make this change. In doing so, I think I have answered your question, as you now have all the skips for all the tracking you asked for, but on sheet 1.

Take a look and see what you think. :)
http://www.mediafire.com/file/ue877dvrmz7ddds/pick3_skip_table%282%29.xlsm
 

khanaran

Member
Hi Frank

Thank you for the the link to the macro where you fixed the formula

I have a small problem, the macro returns an error message when I try to run it

May I please ask you to check on it please.

Thank you

Raj
 

Frank

Member
I think you'll find if you download your Original version from your own link above, it gives an error message ? I never touched your macro, just looked at it. I never actually ran it, I just checked your readout with my corrected skip values and they matched, so assumed it had worked at some point. If you wrote the macro you are the best person to debug it.
Why do you need it? the skip table is more useful in its current form.
 

Sidebar

Top