named range, conditional formatting

  • Thread starter Thread starter drabbacs
  • Start date Start date
D

drabbacs

This is probably something very simply solved but it has eluded me. How
does one perform an offset using the values in named cells.

Example:

cell A1 named LeftRight
cell A2 named UpDown
cell C3 named Base

The names were defined via the spreadsheet.

Range("base").select
Activecell.Offset(UpDown,LeftRight).Select

In general what I am trying to do is move the cursor(activecell) based
on user input in the named cells offset from the starting position
"base".

The immediate window is telling me that LeftRight and UpDown are zero,
ie. undefined (when using Option Explicit). There are values in those
cells.

Thanks in advance
Drabbacs
 
You have to range them as well

Range("base").select
Activecell.Offset(Range("UpDown").value,Range("LeftRight").value).Select

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Use this if base is one cell

Range("base").Offset(Range("UpDown").Value, Range("LeftRight").Value).Select
 

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

Back
Top