Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Offset question

I want this code to function on the current position, 13th column

So if I am in A1 it should be looking at M1

If ActiveSheet.Range(1, 13) = "" Then
OptNoL.Value = True
ElseIf ActiveSheet.Range(1, 13) = 30 Then
opt30L.Value = True
ElseIf ActiveSheet.Range(1, 13) = 60 Then
opt60l.Value = True


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Offset question

H Patrick.

Try:

With ActiveCell.Offset(0,12)
If .Value = "" Then
OptNoL.Value = True
ElseIf .Value = 30 Then
opt30L.Value = True
ElseIf .Value = 60 Then
opt60l.Value = True
Else
'Leave unchanged '<<===== ???
End If
End With


(Note that Range("A1").Offset(1,13) returns the N2 cell)


---
Regards,
Norman



"Patrick Simonds" wrote in message
...
I want this code to function on the current position, 13th column

So if I am in A1 it should be looking at M1

If ActiveSheet.Range(1, 13) = "" Then
OptNoL.Value = True
ElseIf ActiveSheet.Range(1, 13) = 30 Then
opt30L.Value = True
ElseIf ActiveSheet.Range(1, 13) = 60 Then
opt60l.Value = True



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
Offset question Ruth Excel Discussion (Misc queries) 0 December 10th 09 12:10 PM
MOD of OFFSET question? Nastech Excel Discussion (Misc queries) 4 April 28th 08 05:05 AM
Offset Question ram Excel Worksheet Functions 4 February 20th 07 10:52 PM
Offset Question Barb Reinhardt Excel Worksheet Functions 1 September 19th 06 02:49 PM
OFFSET() question for '97 Adam Kroger Excel Discussion (Misc queries) 2 December 11th 05 03:04 PM


All times are GMT +1. The time now is 07:31 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"