Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Lotto number search


hi all,

just 2 queries for performing cell number search within a spreadsheet
and highlighting background search and also performing a number count
of the amount of instances within a range.

Data is:
Number_1 Number_2 Number_3 Number_4 Number_5 Number_6 Supp_1 Supp_2
27 3 11 38 15 22 14 44
2 25 40 42 5 16 43 33
40 33 21 41 42 2 43 28
33 43 12 18 24 9 35 45
44 10 38 8 37 39 22 6

1) I have code as follows but am not able to work out how to execute it
automatically so that it will highlight the numbers in the cells for me
???

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer

If Not Intersect(Target, Range("xx:xx")) is Nothing Then
Select Case Target
Case 3
icolor = 6
Case 11
icolor = 6
Case 38
icolor = 6
Case 15
icolor = 6
Case 22
icolor = 6
Case 14
icolor = 6
Case Else
'Whatever
End Select

Target.Interior.ColorIndex = icolor
End If

End Sub

2) Also would like to work out how many times the numbers appear eg how
many 3's etc to determine frequency

thanks in advance,

sharky


--
sharkman992000
------------------------------------------------------------------------
sharkman992000's Profile: http://www.excelforum.com/member.php...o&userid=35584
View this thread: http://www.excelforum.com/showthread...hreadid=553506

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with my Lotto code please Harry Excel Worksheet Functions 8 August 30th 09 10:40 AM
setting up random number generator for lotto numbers Random Number Generator in Excel 2007 Setting up and Configuration of Excel 1 June 6th 09 01:02 AM
Lotto template Mickey Mouse[_2_] New Users to Excel 3 February 9th 08 07:49 AM
Lotto Number Checker clash Excel Worksheet Functions 7 October 9th 05 04:53 AM
Lotto Number Array Chambersteacher Excel Worksheet Functions 2 February 1st 05 08:41 AM


All times are GMT +1. The time now is 05:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"