Dumb question # 32,345..Moving Around On A Spreadsheet

H

HpyTrvlr69

I would like to know the easiest way to move the cursor wround in the a
spreadsheet in order to change the focus of the cursor. I am trying to move
the sursor to a location determined by an 'if' statement and do some
formatting. Not having any "Logic Luck"
 
G

Gord Dibben

A bit short on details. You don't have to move the cursor to operate on a
range.

Sub colorit()
Dim rng As Range
Set rng = ActiveSheet.Range("A10")
If rng = "Total" Then
rng.Interior.ColorIndex = 3
End If
End Sub


Gord Dibben MS Excel MVP
 
J

JLGWhiz

But if you do not want to use the type of code that Gord suggests, then
Select, Activate and GoTo are equally speedy for just moving the focus of
the cursor. But I would try to learn how to do it like Gord. It eliminates
the power company effect of flicker and flash.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top