Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2011, 04:25 AM
Catalin.B Catalin.B is offline Date Subtraction Windows Vista Date Subtraction Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

paste these macros in a module (change worksheet name as needed.)



Sub auto_open()
' works when you double click a cell and press enter, not when formula result changes, or when you copy formula to range
' whenever you need to update , double click on any cell then press enter
ThisWorkbook.Worksheets("Foaie2").OnEntry = "datesubs"

End Sub

Sub datesubs()
Dim lastrow As Long

With Sheets("Foaie2")
lastrow = Range("A" & Rows.Count).End(xlUp).Row
Cells(1, 1).Value = Cells(lastrow, 1).Value - Cells(2, 1).Value

End With
End Sub
Reply With Quote
  #2  
Old 08-16-2011, 05:04 AM
tinfanide tinfanide is offline Date Subtraction Windows XP Date Subtraction Office 2010 32bit
Expert
Date Subtraction
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

http://www.youtube.com/watch?v=kv2WX3KB0Z0

More on my question:
if you cannot understand my text description, please watch this video.

Last edited by tinfanide; 08-16-2011 at 05:05 AM. Reason: Fix the youtube embedded link
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Date formatting kjxavier Excel 0 08-10-2011 08:17 AM
Date Subtraction Need a date formula MPAVLAS Excel 3 08-12-2010 10:04 PM
Date Subtraction Julian Date windseaker Excel 1 02-14-2010 01:44 AM
new appointment date always reverts back to today's date msills Outlook 0 08-24-2007 08:57 AM
Date Subtraction Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft