Only Run Formula on Cells in The Table.

Timberwolf

New Member
Joined
Feb 20, 2018
Messages
26
Hi all!

When I open my excel book it takes forever to open due to poor coding on my part. I have a bunch of codes like the below code. What I want is instead of E:E which I believe is why it takes so long to open I only want it to check cells in the actual table or until it hits a blank. I understand I could use E1:E10000 but then I would have to keep upping the "E10000" value. Any thoughts?

=COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!$I:$I,"Yes")+COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!L:L,"Yes")+COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!O:O,"Yes")+COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!R:R,"Yes")+COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!U:U,"Yes")+COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!X:X,"Yes")+COUNTIFS('Table Maintenance Reports'!E:E,">=01/01/2019",'Table Maintenance Reports'!E:E,"<=31/01/2019",'Table Maintenance Reports'!AA:AA,"Yes")
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
To improve the performance of your sheet you must change E:E for something like E2:E1000, also O:O, AA:AA, etc.
If you put 1000 and your range changes to 1001, it is advisable to change to something like 1100.
But don't increase beyond that.
Putting a formula that looks for the last value with data from the table also decreases the performance of the sheet.


To improve the performance of your sheet, also delete rows where you have the formula and still do not occupy, or validations that do not occupy or format in cells that do not occupy.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,629
Members
452,661
Latest member
Nonhle

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