Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Noob Question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default Noob Question

G4.Value and G1.Value should both be
Range("G4").Value and Range("G1").Value because G4 and G1 are not objects -
Excel sees them as undeclared variables, hence Variants.
Instead of IsEmpty(Range("D3").Value) you want IsEmpty(Range("D3")) (no
".Value)
HTH

"O...." wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Noob Question

One way:

Public Sub MyEvaluate()
If IsEmpty(Range("D3").Value) Then
Range("G1").Value = (Month(Date) / 12 * Range("G4").Value)
End If
End Sub



In article ,
O.... wrote:

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Noob Question

MyItem = (Month(Now()) / 12 * Range("G4").Value)
Range("G1").Value = MyItem


Do you really want to divide the month n umber by 12?


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"O...." wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Noob Question

Sub MyEvaluate()
Dim MyItem As Long
If IsEmpty(Range("D3").Value) Then
MyItem = (Month(Now()) / 12 * Range("G4").Value)
Range("G1").Value = MyItem
End If
End Sub


--
Regards,
Tom Ogilvy


"O...." wrote:

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Noob Question

O,

Try this

Sub MyEvaluate()
Dim MyItem As Long
If IsEmpty(Range("D3").Value) Then
MyItem = (Month(Now()) / 12 * Range("G4").Value)
Range("G1").Value = MyItem
End If
End Sub

"O...." wrote:

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Noob Question

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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Noob Question

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

or even

myItem = Month(IIf(IsEmpty(Range("D3").Value), Now(),
Range("D3").Value)) / 12 * Range("G4").Value
Range("G1").Value = myItem


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"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



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
Noob Question Probably! :S LHUK Excel Programming 1 August 4th 07 02:14 AM
Noob question letmeplay1977 Excel Worksheet Functions 2 October 5th 05 09:27 PM
Noob question Micro_pal New Users to Excel 2 September 4th 05 02:37 PM
Noob question Micro_pal Excel Discussion (Misc queries) 5 September 3rd 05 01:42 AM
nOOb formulas question patrick Excel Discussion (Misc queries) 1 March 8th 05 02:42 PM


All times are GMT +1. The time now is 07:47 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"