LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ira Ira is offline
external usenet poster
 
Posts: 18
Default assign formula to variant range of cells

I Need help to assign formula to variant range of cells. I added column to
Excel form. This column value is based on group value.
Here is the code I wrote:
Dim Chng As Integer
Dim FDOCRge As Range
Dim LDOCRge As Range
Dim FREQRge As Range
Dim RCFMOS As Range
Dim RwCt As Variant
Dim MnthCl As Variant
Dim Mnth As Date
Dim FDOC As String
Dim LDOC As String
Dim FREQ As String
Dim YrMo As Integer
Dim MoMo As Integer
Dim YrFDOC As Integer
Dim MoFDOC As Integer
Dim YrLDOC As Integer
Dim MoLDOC As Long
Dim Chrg As Long
Dim T As String
Dim MoChrg As Long
Dim AMRTZ As Long
Dim AMRTZRge As Range


On Error GoTo ErrorHandler

Set FDOCRge = Worksheets("Hdwre & Misc").Range("FDOC")
Set LDOCRge = Worksheets("Hdwre & Misc").Range("LDOC")
Set FREQRge = Worksheets("Hdwre & Misc").Range("FREQ")
Set RCFMOS = Worksheets("Hdwre & Misc").Range("RCFMOS")
Set AMRTZRge = Worksheets("Hdwre & Misc").Range("AMRTZ")

For RwCt = FDOCRge.Row + 1 To FDOCRge.Row + FDOCRge.Rows.Count - 1


FDOC = Worksheets("Hdwre & Misc").Cells(RwCt, 13).Value
LDOC = Worksheets("Hdwre & Misc").Cells(RwCt, 14).Value
FREQ = Worksheets("Hdwre & Misc").Cells(RwCt, 17).Value
Chrg = Worksheets("Hdwre & Misc").Cells(RwCt, 16).Value
* AMRTZ = Worksheets("Hdwre & Misc").Cells(RwCt, 20).Select
* ActiveCell.Formula =
"=IF(SUMIF(C[-4],RC[-4],C[-6])20000,RC[-6]/12,RC[-6])"



I have trouble with last 2 lines. Can anyone help me? Thank you in advance.


 
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
variant array with formula strings to range formulae Amedee Van Gasse Excel Programming 4 May 20th 08 09:27 AM
Excal, Variant and Range witek Excel Programming 6 March 17th 08 11:36 PM
range and variant Danilo[_2_] Excel Programming 0 January 26th 08 03:10 PM
How do I assign range to variant and use Mike H[_2_] Excel Discussion (Misc queries) 7 June 7th 07 01:40 AM
Assigning range to variant vezerid Excel Programming 2 March 12th 07 04:46 PM


All times are GMT +1. The time now is 04:56 AM.

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"