|
-
Mar 1st, 2006, 11:25 AM
#1
Thread Starter
Addicted Member
[RESOLVED] find the error in the formula
Hi guys,
I'm getting a Run Time Error 1004, Application-defined or object-defined Error in the formula below.
I've tried almost everything except the right thing, can you find it???
VB Code:
ActiveCell.Offset(0, 4).Formula = "=IF((" & ActiveCell.Offset(0, 2).Address & "<" & ActiveCell.Offset(0, 3).Address & "),"",(" & ActiveCell.Offset(0, 2).Address & " / (" & ActiveCell.Offset(0, 2).Address & "-" & ActiveCell.Offset(0, 3).Address & "))-1)"
thanks
-
Mar 1st, 2006, 11:46 AM
#2
Re: find the error in the formula
Bill
Are you sure you should be using the Address property of the cells and not the Value property?
What exactly are you trying to achieve?
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Mar 1st, 2006, 11:50 AM
#3
Re: find the error in the formula
Ignore previous posts.
Try this
"=IF((" & ActiveCell.Offset(0, 2).Address & "<" & ActiveCell.Offset(0, 3).Address & "), 0,(" & ActiveCell.Offset(0, 2).Address & " / (" & ActiveCell.Offset(0, 2).Address & "-" & ActiveCell.Offset(0, 3).Address & "))-1)"
I change the TRUE result to a Zero, rather than a "" and it now works.
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Mar 1st, 2006, 11:56 AM
#4
Thread Starter
Addicted Member
Re: find the error in the formula
I'm building a template sheet.
Like
ITEM Name Sales TY Sales LY % DIFF
A
B
C
TOTAL
D
E
F
TOTAL
G
H
I
TOTAL
I need the formula to be paste a each TOTAL line
Even by using Value proterty, I'm getting the same error
Thanks
-
Mar 1st, 2006, 11:58 AM
#5
Thread Starter
Addicted Member
Re: find the error in the formula
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|