Thread: plus 1
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alex alex is offline
external usenet poster
 
Posts: 48
Default plus 1

On Jul 19, 5:14 pm, Gord Dibben <gorddibbATshawDOTca wrote:
I tested before posting and tested again just now.

Works one cell at a time as you paste a date to each cell.

Are you trying to paste a range of cells?

Gord



On Thu, 19 Jul 2007 07:18:21 -0700, alex wrote:
On Jul 17, 12:15 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value + 1
.NumberFormat = "dd mm yyyy"
Application.EnableEvents = True
End With
End Sub


This is sheet event code. Right-click on the sheet tab and copt/paste the code
into that sheet module.


Gord


On Mon, 16 Jul 2007 03:02:12 -0700, alex wrote:
Thanks (to both) for your help. Your suggestions obviously worked.
Would you happen to know the VBA code to accomplish the same task,
without the extra step?
I'd like users to simply paste in the date and have said date
automatically increase by one.- Hide quoted text -


- Show quoted text -


Thanks for your help Gord. This code works; however, only when I type
the values and not when they're pasted from another application,
including Excel.


alex- Hide quoted text -


- Show quoted text -


Gord,

I am pasting a range of cells, sometimes hundreds, but only one
column.

alex