View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
maperalia maperalia is offline
external usenet poster
 
Posts: 258
Default Max and Min VBA Statement

I have the following formulas setup in the cells:

K10=IF(A1=0,"",MIN(IF(RIGHT($A$1:$A$30000)="A",--(LEFT($A$1:$A$30000,LEN($A$1:$A$30000)-1)))))

and

L10=IF(A1=0,"",MAX(IF(RIGHT($A$1:$A$30000)="A",--(LEFT($A$1:$A$30000,LEN($A$1:$A$30000)-1)))))

It is working Ok!, however, takes too much time to run it because I am using
30,000 rows.

I wonder if there is any way if you can help me to get the statement to make
it run as a VBA and make it until last row is empty because as you see in my
formula I am calculating for 30,000 rows and in addition of the time is been
taking to run it, I am concern if my data exceed this number and I have to
change the formula all the time.

Thanks in advance.
Maperalia