Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default help with an IF formula


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default help with an IF formula

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)

"Alan M" wrote in message
...

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



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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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