Reduce formula

trimiii

Board Regular
Joined
May 15, 2018
Messages
69
Office Version
  1. 365
Platform
  1. Windows
HI,

I am using the following formula which is too long.. any idea how to short this?


=COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!J6:J105,">="&A4,'A-MAP'!J6:J105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!L6:L105,">="&A4,'A-MAP'!L6:L105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!N6:N105,">="&A4,'A-MAP'!N6:N105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!P6:P105,">="&A4,'A-MAP'!P6:P105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!R6:R105,">="&A4,'A-MAP'!R6:R105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!T6:T105,">="&A4,'A-MAP'!T6:T105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!V6:V105,">="&A4,'A-MAP'!V6:V105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!X6:X105,">="&A4,'A-MAP'!X6:X105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!Z6:Z105,">="&A4,'A-MAP'!Z6:Z105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!AB6:AB105,">="&A4,'A-MAP'!AB6:AB105,"<="&B4)+COUNTIFS('A-MAP'!B6:B105,Sheet1!$A$1,'A-MAP'!AD6:AD105,">="&A4,'A-MAP'!AD6:AD105,"<="&B4)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
It doesn't look too long to me.

If it works, don't try to fix what isn't broken. Shorter alternatives will take longer to calculate.
 
Upvote 0
Perhaps something like:

=SUMPRODUCT(('A-MAP'!B6:B105=Sheet1!$A$1)*('A-MAP'!J6:AD105>=A4)*(MOD(COLUMN('A-MAP'!J6:AD105),2)=0)*('A-MAP'!J6:AD105<=B4))
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,601
Members
449,109
Latest member
Sebas8956

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