Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I have a quoting sheet and I want to be able to prorate # of months an item will be covered by warranty based on a date. What I have is 30 lines so I would want an inputbox to open if the user inserts a Y in the "C" Column. The inputbox would ask for a date and it would take that date and subtract it from a cell that has a different date in it. Thus giving me an answer. I'm sure this possible, just don't know the proper syntax. I was going to start of with something like: Private Sub Worksheet_Changes(ByVal Target As Range) Dim ans As String If Target.Address = Range("$C$25", "$C$54") And Target.Value = "Y" Then With Worksheets("agreement") ans = InputBox("What is the warranty expiration date #", "Prorate months", Sheets("Agreement").ActiveCell.Value) -then the "ans" would be subtracted from cell $L$11- Can this be done? P.S. I already have a Private Sub Worksheet_Change(ByVal Target As Range) being used for a different function, can I add another one to avoid conflict by adding an "s" to the end to make it Private Sub Worksheet_Changes(ByVal Target As Range)? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I have a cell calculate based on a portion of another cell | Excel Discussion (Misc queries) | |||
Trying to calculate results in one cell, based on data of another | Excel Discussion (Misc queries) | |||
Calculate Value on new cell based on List | New Users to Excel | |||
Calculate the number of weeksdays based on a cell value | Excel Worksheet Functions | |||
IF statement to calculate based on cell values | Excel Worksheet Functions |