Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default named range, conditional formatting

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default named range, conditional formatting

You have to range them as well

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

--

HTH

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


"drabbacs" wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default named range, conditional formatting

That did it, thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default named range, conditional formatting

Use this if base is one cell

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"drabbacs" wrote in message oups.com...
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



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
Conditional Formatting based on active Named Range; IF Function to VBA Todd[_4_] Excel Worksheet Functions 1 December 1st 11 09:01 PM
Conditional formatting when text is contained in a named range Hugh Excel Discussion (Misc queries) 2 July 31st 09 02:35 PM
Conditional formatting 'Named Range' dilemma Blue Max Excel Worksheet Functions 4 December 22nd 08 09:16 PM
Conditional Formatting - 2 Worksheets one Named Range Sam via OfficeKB.com Excel Worksheet Functions 5 January 27th 07 03:00 PM
Conditional formatting if value in cell is found in a named range Grumpy Grandpa Excel Worksheet Functions 5 April 15th 06 04:30 PM


All times are GMT +1. The time now is 01:04 PM.

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

About Us

"It's about Microsoft Excel"