Select one cell insteade of a range

  • Thread starter Thread starter Marge
  • Start date Start date
M

Marge

Is it possible with VBA the make a sheet select only one cell at a
time when you drag the cursor around the sheet instead of the normal
function of selecting a range?
 
You can do it with VBA code. Right click the tab at the bottom of the
worksheet you want to have this functionality, select View Code from the
popup menu that appears and copy/paste this code into the code window that
opened up...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target(1).Select
End Sub

Now, go back to that worksheet and try to select multiple cells.
 
Thanks Rick,

That does do what I asked :o)

not quite what I was hoping for though, not sure if it would be
possible, instead of still selecting the upper left cell I want each
cell under the cursor as it moves to be selected individually.
 
Not sure that this is what you mean, but you can select multiple
discontiguous cells (and/or groups of cells) if you hold down <Ctrl> while
you move about the sheet selecting.
 
Thanks for the reply, but no,

when I press the mouse button and move in a diagonal line I want to
select each individual cell momentarily in that diagonal line not
stretch to a group(larger square)

If there was a way to make excel just select the cell under the cursor
as you move the mouse that would do just what I need.
 
Back
Top