Formula speed required.

Craig1

Active Member
Joined
Jun 11, 2009
Messages
322
Hi All,
I have a sumproduct formula and because I want it to check the whole column it takes quite a while to update.
The formula is:-

=SUMPRODUCT(--(L$L$11:$L$62056="Black"),--($A$11:$A$62056>=$G$44),--($A$11:$A$62056<=$H$44))

Instead of the 62056 rows, is there a quicker way of looking at the column to the end of the data, the data may only be 2 rows down so it doesn't need to look all the way down or up.

Craig.
 
Hi All,
I have a sumproduct formula and because I want it to check the whole column it takes quite a while to update.
The formula is:-

=SUMPRODUCT(--(L$L$11:$L$62056="Black"),--($A$11:$A$62056>=$G$44),--($A$11:$A$62056<=$H$44))

Instead of the 62056 rows, is there a quicker way of looking at the column to the end of the data, the data may only be 2 rows down so it doesn't need to look all the way down or up.

Craig.

Is there a reason you say L$ twice?
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Thanks for that Armando I might consider that if all else fails.

Michael,
I will try the code in a little while.

Thanks for the help.

Craig.
 
Upvote 0
ooops, typo....too much easter bunny.
you will need to change the formula to access the sheet name
Code:
Sub fastsum()
Dim lr As Long, r As Long
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
lr = Cells(Rows.Count, "L").End(xlUp).Row
    For r = lr To 11 Step -1
        If Range("L" & r).Value <> "" Then
            Range("A" & r).Formula = "=SUMPRODUCT(--(L$11:$L$" & lr & "=""Black""),--($A$11:$A$" & lr & ">=$G$44),--($A$11:$A$" & lr & "<=$H$44))"
        End If
    Next r
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
 
Upvote 0
Biff,
Thanks also for your reply, I will try this as well. But I think excel will have to wait a couple of days while I enjoy the rest of Easter with the kids.

All,
Thanks for all the help tonight and I will let you know how I get on.

Craig.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,290
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top