Offset question

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

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
 
Patrick,
Use Cells():
If Cells(1, 13).Value = "" Then
OptNoL.Value = True
ElseIf Cells(1, 13).Value = 30 Then
opt30L.Value = Tue
ElseIf Cells(1, 13).Value = 60 Then
opt60l.Value = True
End If

Swisse
 
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)
 

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