Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Min not zero revisited
I am trying to input an array function onto my Excel sheet through VBA. I
try the following code, and instead of giving me some type of error... it just skips past the rest of my code and goes straight to "End Sub" after trying to evaluate. Can someone please tell me two things... 1) what did I do wrong? and 2) why would it skip all the rest of my code and go straight to End Sub? Thanks! Matt LastRow = Cells(Rows.Count, "F").End(xlUp).Row ActiveCell.Offset(3, 0).FormulaArray = "=MIN(IF(R13C:R" & LastRow & "C)0,R13C:R" & LastRow & "C))" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Min not zero revisited
All,
I found the problem... I was missing a "(". Not sure why this would stop the macro though. I also ran into another problem immediately after fixing that one... I tried this code: ActiveCell.Range("A1:A3").Copy Destination:=ActiveCell.Range("A1:J3,L1:O3,Q1:S3") Thinking it would copy the Formula Array but this promptly stopped the macro as well. So then I tried this: ActiveCell.Offset(3, 0).Range("A1:J1,L1:O1,Q1:S1").FormulaArray = "=MIN(IF((R13C:R" & LastRow & "C)0,R13C:R" & LastRow & "C))" It copies the formula over... but it retains the same column as the first cell for all the range. Please help! How do I copy this formula array in multiple cells? Thanks so much, Matt "Matt S" wrote: I am trying to input an array function onto my Excel sheet through VBA. I try the following code, and instead of giving me some type of error... it just skips past the rest of my code and goes straight to "End Sub" after trying to evaluate. Can someone please tell me two things... 1) what did I do wrong? and 2) why would it skip all the rest of my code and go straight to End Sub? Thanks! Matt LastRow = Cells(Rows.Count, "F").End(xlUp).Row ActiveCell.Offset(3, 0).FormulaArray = "=MIN(IF(R13C:R" & LastRow & "C)0,R13C:R" & LastRow & "C))" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
comparing two columns revisited | Excel Worksheet Functions | |||
14 Day Average REVISITED | Excel Discussion (Misc queries) | |||
Help with averages revisited | Excel Worksheet Functions | |||
array revisited | Excel Programming | |||
Last row, last column revisited | Excel Programming |