LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Populating IF Formula while looping - trouble with index interpret

I need to populate this IF into all cells in my spreadsheet (many others to
do as well). Somehow, my code is inserting the row index but it's the
variable name and not the value,,,resulting in this value
=IF(O(rIndex)=0,0,N(rIndex)/O(rIndex))

What am I missing? Is there an easier way to do this? Users may or may not
have 2007 loaded - will that be a consideration? Newbie to Excel coding!

Sub var_RE()
rIndex = 2 'set row to 2
For rIndex = 2 To 12
Cells(rIndex, 17).Formula = "=IF( [RE_Current] = 0, 0,
[Total_MTD] / [RE_Current])"
Next rIndex
End Sub



 
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
Index formula trouble Jambruins Excel Discussion (Misc queries) 2 April 9th 08 09:10 PM
Trouble populating ComboBox from a range [email protected] Excel Programming 3 March 5th 08 04:26 PM
looping trouble Hru48 Excel Discussion (Misc queries) 5 May 12th 06 08:35 PM
Trouble with looping Rbp9ad[_2_] Excel Programming 9 October 8th 05 01:20 AM
Looping trouble JC[_5_] Excel Programming 2 September 11th 03 08:22 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"