ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Auto Selecting Cells (https://www.excelbanter.com/excel-worksheet-functions/53942-auto-selecting-cells.html)

Greegan

Auto Selecting Cells
 
I have a changing value in cell K7 which will result in a random number
(already generated - no assistance needed here) with a letter for my BINGO
game. So B1-B15, I16-I30, etc all the way to O75.
I have a range of numbers to match the randomly generated number in cells B1
to P5.

What I would like is when any cell in B1-O75 is equal to the value in K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Right now I need to select that matching cell, then select a menu item I
call Next Turn, and then it will generate a new number. But I have to do
this with each and every turn and ... well that's 75 turns to do the same
thing repeatedly (CellNextTurn,CellNextTurn, and so on).

If someone can give me a script that will auto select the identical cell,
then it only be Button, Button, Button.

Thank you in advance

G



Bob Phillips

Auto Selecting Cells
 
Does it need to be selected for you, or just highlighted? If the latter, you
could use conditional formatting.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Greegan" wrote in message
...
I have a changing value in cell K7 which will result in a random number
(already generated - no assistance needed here) with a letter for my BINGO
game. So B1-B15, I16-I30, etc all the way to O75.
I have a range of numbers to match the randomly generated number in cells

B1
to P5.

What I would like is when any cell in B1-O75 is equal to the value in K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Right now I need to select that matching cell, then select a menu item I
call Next Turn, and then it will generate a new number. But I have to do
this with each and every turn and ... well that's 75 turns to do the same
thing repeatedly (CellNextTurn,CellNextTurn, and so on).

If someone can give me a script that will auto select the identical cell,
then it only be Button, Button, Button.

Thank you in advance

G





Don Guillett

Auto Selecting Cells
 
right click sheet tabview codeinsert thismodify to suitSAVE

Private Sub Worksheet_Change(ByVal Target As Range)
Set myrange = Range("b1:b4")
If Target.Address < "$D$1" Then Exit Sub
If Intersect(Target, myrange) Is Nothing Then
myrange.Find(Target).Activate
End If
End Sub

--
Don Guillett
SalesAid Software

"Greegan" wrote in message
...
I have a changing value in cell K7 which will result in a random number
(already generated - no assistance needed here) with a letter for my BINGO
game. So B1-B15, I16-I30, etc all the way to O75.
I have a range of numbers to match the randomly generated number in cells

B1
to P5.

What I would like is when any cell in B1-O75 is equal to the value in K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Right now I need to select that matching cell, then select a menu item I
call Next Turn, and then it will generate a new number. But I have to do
this with each and every turn and ... well that's 75 turns to do the same
thing repeatedly (CellNextTurn,CellNextTurn, and so on).

If someone can give me a script that will auto select the identical cell,
then it only be Button, Button, Button.

Thank you in advance

G





Greegan

Auto Selecting Cells
 
Thank you for your help Don.

I see what this does and I actually understand it, however its selecting the
cell the range is being compared to.
I need it to select the cell in the range that matches what currently is my
target.
Is there something we can change here to make that work?

Thanks again,

G
"Don Guillett" wrote in message
...
right click sheet tabview codeinsert thismodify to suitSAVE

Private Sub Worksheet_Change(ByVal Target As Range)
Set myrange = Range("b1:b4")
If Target.Address < "$D$1" Then Exit Sub
If Intersect(Target, myrange) Is Nothing Then
myrange.Find(Target).Activate
End If
End Sub

--
Don Guillett
SalesAid Software

"Greegan" wrote in message
...
I have a changing value in cell K7 which will result in a random number
(already generated - no assistance needed here) with a letter for my
BINGO
game. So B1-B15, I16-I30, etc all the way to O75.
I have a range of numbers to match the randomly generated number in cells

B1
to P5.

What I would like is when any cell in B1-O75 is equal to the value in K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Right now I need to select that matching cell, then select a menu item I
call Next Turn, and then it will generate a new number. But I have to do
this with each and every turn and ... well that's 75 turns to do the same
thing repeatedly (CellNextTurn,CellNextTurn, and so on).

If someone can give me a script that will auto select the identical cell,
then it only be Button, Button, Button.

Thank you in advance

G







Greegan

Auto Selecting Cells
 
It needs to be selected.
"Bob Phillips" wrote in message
...
Does it need to be selected for you, or just highlighted? If the latter,
you
could use conditional formatting.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Greegan" wrote in message
...
I have a changing value in cell K7 which will result in a random number
(already generated - no assistance needed here) with a letter for my
BINGO
game. So B1-B15, I16-I30, etc all the way to O75.
I have a range of numbers to match the randomly generated number in cells

B1
to P5.

What I would like is when any cell in B1-O75 is equal to the value in K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Right now I need to select that matching cell, then select a menu item I
call Next Turn, and then it will generate a new number. But I have to do
this with each and every turn and ... well that's 75 turns to do the same
thing repeatedly (CellNextTurn,CellNextTurn, and so on).

If someone can give me a script that will auto select the identical cell,
then it only be Button, Button, Button.

Thank you in advance

G







Don Guillett

Auto Selecting Cells
 

What I would like is when any cell in B1-O75 is equal to the value in K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Based on this I designed so that if you put in 4 in cell d1 it would goto
the cell with 4 in the table. What do you want?

--
Don Guillett
SalesAid Software

"Greegan" wrote in message
...
Thank you for your help Don.

I see what this does and I actually understand it, however its selecting

the
cell the range is being compared to.
I need it to select the cell in the range that matches what currently is

my
target.
Is there something we can change here to make that work?

Thanks again,

G
"Don Guillett" wrote in message
...
right click sheet tabview codeinsert thismodify to suitSAVE

Private Sub Worksheet_Change(ByVal Target As Range)
Set myrange = Range("b1:b4")
If Target.Address < "$D$1" Then Exit Sub
If Intersect(Target, myrange) Is Nothing Then
myrange.Find(Target).Activate
End If
End Sub

--
Don Guillett
SalesAid Software

"Greegan" wrote in message
...
I have a changing value in cell K7 which will result in a random number
(already generated - no assistance needed here) with a letter for my
BINGO
game. So B1-B15, I16-I30, etc all the way to O75.
I have a range of numbers to match the randomly generated number in

cells
B1
to P5.

What I would like is when any cell in B1-O75 is equal to the value in

K7
then the cursor, cell highlight or whatever, auto selects that matching
cell.

Right now I need to select that matching cell, then select a menu item

I
call Next Turn, and then it will generate a new number. But I have to

do
this with each and every turn and ... well that's 75 turns to do the

same
thing repeatedly (CellNextTurn,CellNextTurn, and so on).

If someone can give me a script that will auto select the identical

cell,
then it only be Button, Button, Button.

Thank you in advance

G










All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com