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

Hi,

I am using the following code but I need to have D3 value change depending
on what row I am entering data into.

I have been working on this and can't find the answer.

Here's the code:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim AOI As Range

Set AOI = [D3]

If Not Intersect(Target, AOI) Is Nothing Then
Select Case AOI.Text
Case Is = "Possible Soft Hold"
AOI.Offset(0, 7).Value = Date
Case Is = "Soft Hold"
AOI.Offset(0, 8).Value = Date
Case Is = "Hard Cut"
AOI.Offset(0, 9).Value = Date
End Select

End If
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Offset Range

Private Sub Worksheet_Change(ByVal Target As Range)
Dim AOI As Range

If Not Intersect(Target, Me.Columns(4)) Is Nothing Then

With Target

Select Case AOI.Text
Case Is = "Possible Soft Hold"
AOI.Offset(0, 7).Value = Date
Case Is = "Soft Hold"
AOI.Offset(0, 8).Value = Date
Case Is = "Hard Cut"
AOI.Offset(0, 9).Value = Date
End Select
End With
End If
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Enigo" wrote in message
...
Hi,

I am using the following code but I need to have D3 value change depending
on what row I am entering data into.

I have been working on this and can't find the answer.

Here's the code:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim AOI As Range

Set AOI = [D3]

If Not Intersect(Target, AOI) Is Nothing Then
Select Case AOI.Text
Case Is = "Possible Soft Hold"
AOI.Offset(0, 7).Value = Date
Case Is = "Soft Hold"
AOI.Offset(0, 8).Value = Date
Case Is = "Hard Cut"
AOI.Offset(0, 9).Value = Date
End Select

End If
End Sub



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
Range offset jsd219 Excel Programming 18 October 30th 06 01:39 AM
Copy range using offset range value caroline Excel Programming 2 February 16th 06 02:51 PM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM
Using Offset to name a range Jennifer Excel Worksheet Functions 3 June 15th 05 10:07 AM
range offset Douvid Excel Programming 5 August 20th 03 04:38 PM


All times are GMT +1. The time now is 03:08 AM.

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"