Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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
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
comparing two columns revisited JoeM[_3_] Excel Worksheet Functions 1 May 1st 09 07:43 PM
14 Day Average REVISITED F. Lawrence Kulchar Excel Discussion (Misc queries) 4 September 8th 08 11:54 PM
Help with averages revisited TimJames Excel Worksheet Functions 6 March 10th 08 12:20 PM
array revisited [email protected][_2_] Excel Programming 2 March 22nd 06 07:35 PM
Last row, last column revisited David O. Antillon Excel Programming 4 August 2nd 05 04:08 AM


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