Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

help with an IF formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan M - 24 Jan 2006 11:13 GMT

I have the follwing code which sets a formaula in a specific column
   
   With Margin
       .FormulaR1C1 = "=SUM(RC[-1]-RC[-3])"
           '.Value = .Value
       End With

However some of the values in the C[-3] column are blank and so neagative
figures show as a result. I need to amend the formula to include an if
function which says that if the [-3] column is blank then return a zero as
the result
     
Bob Phillips - 24 Jan 2006 11:57 GMT
Your description doesn't make sense to me, but here is what you said

       .FormulaR1C1 = "=IF(RC[-3]="""","""",RC[-1]-RC[-3])"

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> I have the follwing code which sets a formaula in a specific column
>
[quoted text clipped - 7 lines]
> function which says that if the [-3] column is blank then return a zero as
> the result
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.