![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 8
|
I have several questions;
Question #1 Does anyone have a vba code which will enter a date in an adjacent cell when a value is entered in the cell beside it? Question #2 Is it possible to have a dynamic range of data in different files copied into a single spread sheet as soon as the target spread sheet is opened, and then have the data that was pasted (dymnamic of course) sorted by date (high to low) which would be in say column "D" Thanks in advanced, regards, ATV |
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Look here for question 1. Change ,3 to ,1 in all instances.
http://www.mrexcel.com/board/viewtop...c=2559&forum=2 HTH. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 8
|
Went to the link you post, and entered pasted the code, it doesn't work. I entered a value in A1 and no date appeared in D1.
Any other suggestions? Thanks in advanced. ATV |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Tulsa, OK
Posts: 354
|
To your second part see http://www.mrexcel.com/board/viewtop...c=2633&forum=2
|
|
|
|
|
|
#5 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
On the worksheet in question, right-click, click on view code. Paste the following code into the sheet class module:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns(1)) Is Nothing Then
If Target.Offset(, 1).Value = Empty _
And Target <> "" Then
Target.Offset(, 1).Value = Date
End If
End If
End Sub
Code:
Sub mkSure() Application.EnableEvents = True End Sub _________________ Cheers, NateO [ This Message was edited by: NateO on 2002-03-18 16:17 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|