Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default still stuck on days value to year value code

In the below code i get a date result in sheet(Print & Shading Page)from,
a value(date) in sheet(Induction Frequency Page) being added to a value(number) in sheet(Induction Frequency Page)

At present i am using DAYS as a number in the sheet(Induction Frequency Page). eg. 365.25 to represent 1 year; 730.50 to represent 2 years etc

But i want to ADAPT the below code to work the same by adding the date in 1 sheet to the number in another sheet annd placing that date in a 3rd sheet,
BUT WITH ENTERING VALUES SUCH AS 1(year) or 5(years) INSTEAD OF THE CURRENT 365(days) method the code is doing now.

I think i have to place a date formula step in the below code indicated by the arrow, but am not sure what formula to add, to change the sheet(Induction Frequency Page) VALUE from DAYS to YEARS.

Sub Dates()
Dim cell As Range
Dim PSP As Worksheet
Dim ifp As Worksheet

Set PSP = worksheets("Print & Shading Page")
Set ifp = worksheets("Induction Frequency Page")

For Each cell In worksheets("Inductions Update Page").Range("C8:R30")
With cell
If .Value < "" Then
PSP.Range(.Address).Value = ifp.Range(.Address).Value + ..Value
End If
End With
Next

End Sub

Easy??

Corey....
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
Calc days between two dates and exclude leap year days scoz Excel Worksheet Functions 5 November 23rd 07 03:58 PM
i have two days and i want the difference in days, months, year maja Excel Worksheet Functions 7 April 22nd 06 01:14 AM
Help! I am stuck calculating Days, Hours, Mins please help OB1 Excel Worksheet Functions 2 November 15th 04 06:14 PM
Help! I am stuck calculating Days, Hours, Mins please help OB1 Excel Worksheet Functions 3 November 15th 04 05:17 PM
Help! I am stuck calculating Days, Hours, Mins please help OB1 Excel Worksheet Functions 2 November 15th 04 05:17 PM


All times are GMT +1. The time now is 05:03 PM.

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"