Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
Thanks Guys.... One more question. Should I use a nested If or can I use
Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
Sub MyEvaluate()
Dim MyItem As Double If IsEmpty(Range("D3").Value) Then MyItem = Month(Now) / 12 * Range("G4").Value Else MyItem = Month(Range("D3").Value) / 12 * Range("G4").Value End If Range("G1").Value = MyItem End Sub "O...." wrote in message ... Thanks Guys.... One more question. Should I use a nested If or can I use Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
Thanks Zone, How do I Execute it for Multiply worksheets when the work book
is open "O...." wrote: Thanks Guys.... One more question. Should I use a nested If or can I use Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
Sorry, I don't know what you mean by "Multiply worksheets".
"O...." wrote in message ... Thanks Zone, How do I Execute it for Multiply worksheets when the work book is open "O...." wrote: Thanks Guys.... One more question. Should I use a nested If or can I use Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
I have a workbook called Vacation Accurred within that workbook I have
Wooksheets for John Doe, Jane Doe, Joe Smith, Suzzie Jones, etc I Want to execute that code when the Wookbook is open for all Worksheets (John Doe, Jane Doe, Suzzie Jones and So On..... thanks... "Zone" wrote: Sorry, I don't know what you mean by "Multiply worksheets". "O...." wrote in message ... Thanks Zone, How do I Execute it for Multiply worksheets when the work book is open "O...." wrote: Thanks Guys.... One more question. Should I use a nested If or can I use Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
Vacation Accrued, Sorry I'm half retarded
"O...." wrote: I have a workbook called Vacation Accurred within that workbook I have Wooksheets for John Doe, Jane Doe, Joe Smith, Suzzie Jones, etc I Want to execute that code when the Wookbook is open for all Worksheets (John Doe, Jane Doe, Suzzie Jones and So On..... thanks... "Zone" wrote: Sorry, I don't know what you mean by "Multiply worksheets". "O...." wrote in message ... Thanks Zone, How do I Execute it for Multiply worksheets when the work book is open "O...." wrote: Thanks Guys.... One more question. Should I use a nested If or can I use Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Noob Question 2
To do this on all the worksheets when the workbook is opened, copy this code
and paste in the Workbook Module. On my machine (Excel XP), you can find this module by showing one of the spreadsheets, right-click on the Excel icon on the very left side of the menubar, and select View Code. Paste the code in there. When you open the workbook the next time, it will run on all sheets. Hope this helps, James Private Sub Workbook_Open() Dim MyItem As Double, ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Activate If IsEmpty(Range("D3").Value) Then MyItem = Month(Now) / 12 * Range("G4").Value Else MyItem = Month(Range("D3").Value) / 12 * Range("G4").Value End If Range("G1").Value = MyItem Next ws End Sub "O...." wrote in message ... Vacation Accrued, Sorry I'm half retarded "O...." wrote: I have a workbook called Vacation Accurred within that workbook I have Wooksheets for John Doe, Jane Doe, Joe Smith, Suzzie Jones, etc I Want to execute that code when the Wookbook is open for all Worksheets (John Doe, Jane Doe, Suzzie Jones and So On..... thanks... "Zone" wrote: Sorry, I don't know what you mean by "Multiply worksheets". "O...." wrote in message ... Thanks Zone, How do I Execute it for Multiply worksheets when the work book is open "O...." wrote: Thanks Guys.... One more question. Should I use a nested If or can I use Else. If there's a date In (Range("D3").Value) I Want to take the Month of "D3" / 12 * Range("G4").Value). Thanks O...... I'm Getting Object Required. Run Time Error '424' . Trying to evaluate a cell and If it's Null do the calculation MyItem = (Month(Now()) / 12 * G4.Value) and place it cell G1 and if it's NOT Null use the Value in D3 Cell which is a date and Replace the Now Function in my Calculation. Thanks for the Help in Advance. O.... Sub MyEvaluate() Dim MyItem As Long If IsEmpty(Range("D3").Value) Then MyItem = (Month(Now()) / 12 * G4.Value) G1.Value = MyItem End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Noob Question | Excel Programming | |||
Noob Question Probably! :S | Excel Programming | |||
Noob question | Excel Worksheet Functions | |||
Noob question | New Users to Excel | |||
Noob question | Excel Discussion (Misc queries) |