LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default Using Range and Offset to determine value of a field

Dear excel(lent) users,

I have learned from a previous thread, that it is possible to enter
something in one field and automatically have something (like a date entered
in another field) :

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
If Target.Count 1 Then Exit Sub
Set rng = Range("B:B") '< Could be B:B for an entire column
If Intersect(Target, rng) Is Nothing Then Exit Sub
If Target < "" Then Target.Offset(0, 6) = Now()
If Target = "" Then Target.Offset(0, 6) = ""
End Sub

Now I also want to know if it is possible to make sums where I have 'now()'.

For instance something like
If Target < "" Then Target.Offset(0, -1) = Target.Offset(-1,-1)+1

So in the above case if I fill in something in column B a date will be
entered in Column H, with my change I would add a number in column A to the
one in the line above, similar to (IF B2<"";A1+1;"").

Offcourse I could use the simple if statement, but people tend to overwrite
it without realising.

Thanks for helping me in this matter.
 
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
Determine if a value in a range is close to the value of another c Raven Excel Worksheet Functions 0 June 7th 06 07:47 PM
Determine if a value in a range is close to the value of another c Marcelo Excel Worksheet Functions 0 June 7th 06 07:46 PM
Determine if Cell Address is within a Range John Michl Excel Worksheet Functions 4 December 22nd 05 07:59 PM
Determine whether a value is in a range of cells Carl Excel Discussion (Misc queries) 2 December 12th 05 12:23 AM
How do you determine if a field is blank in a logical expression. Van Excel Discussion (Misc queries) 2 December 5th 05 10:08 PM


All times are GMT +1. The time now is 02:55 PM.

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

About Us

"It's about Microsoft Excel"