Excel Formula Dynamically

kashif.special2005

Active Member
Joined
Oct 26, 2009
Messages
443
Hi,

I have Date columns that is dynamically expand or reduce as per date selection by user, my question is how can I dynamically adjust formula, for example my date column starts from Column C, and user select start date is 01-09-2017 (Date Format is DD-MM-YYYY) To 25-09-2017, then the formula would be like below.

=COUNTIFS($C4:$AA4,">75")

and like if user selects Start date 10-02-2017 To 20-02-2017 then the formula would be like below.

=COUNTIFS($C4:$M4,">75")


Note:- There is around 20000 rows data, and the column adding or reduced by VBA, I just want to adjust formula reference dynamically and take the right refference.

=COUNTIFS($C4:$AA4,">75")

I am trying to build a formula dynamically for above formula, however it giving me an error about invalid formula

=COUNTIFS(ADDRESS(ROW(),3,4,1):ADDRESS(ROW(),MATCH("Average of RRC stp FR, DL PW",$2:$2,0)-1,4,1),">75")

I googled it and saw that maybe INDIRECT formula can do the trick, but I also read that INDIRECT formula is a VOLATILE formula and it is heavy formula.

Please guide me how can I achieve this desired result.

Thanks
Kashif
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Please try to be concise when describing a problem... So, generically:

Either...

=COUNTIFS(C4:INDEX(C4:XFD4,MATCH(…,0)),">75")

Or...

=COUNTIFS(INDEX(C4:XFD4,MATCH(...)):INDEX(C4:XFD4,MATCH(…,0)),">75")<strike></strike>
 
Upvote 0

Forum statistics

Threads
1,215,500
Messages
6,125,166
Members
449,210
Latest member
grifaz

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