address reference in range not working

vladi305

Board Regular
Joined
Jan 12, 2023
Messages
88
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I'm using the following formula to keep count until an specifict date, that specific date is located today at P340 cell, this updates and tomorrow or day after tomorrow will be P341 so I can't have this hardcoded


=COUNTIFS($P$2:$P$340,P2&"",$Q$2:$Q$340,Q2&"",$R$2:$R$340,R2&"",$S$2:$S$340,S2&"",$T$2:$T$340,T2&"")

I'm using the following but it's giving me an error within the range:
ADDRESS(MATCH(DATEVALUE("9/2/20"),A:A,0),16)

=COUNTIFS($P$2:ADDRESS(MATCH(DATEVALUE("9/2/20"),A:A,0),16),P2&"",$Q$2:$Q$340,Q2&"",$R$2:$R$340,R2&"",$S$2:$S$340,S2&"",$T$2:$T$340,T2&"")

The error is on the pic attached
 

Attachments

  • Pic60.jpg
    Pic60.jpg
    29 KB · Views: 2

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
How about
Excel Formula:
P$2:INDEX(P:P,MATCH(DATEVALUE("9/2/20"),A:A,0))
 
Upvote 0
Solution
Hi vladi305,

Do the range arguments need to be the same size too? For instance, all other range arguments are from row 2 to row 340, but for column P it is matching a date so it might be P2:P300.

Just a thought,

Doug
 
Upvote 0
How about
Excel Formula:
P$2:INDEX(P:P,MATCH(DATEVALUE("9/2/20"),A:A,0))
It works fine, thanks again Fluff

=COUNTIFS($P$2:INDEX(P:P,MATCH(DATEVALUE("9/2/20"),A:A,0)),P2&"",$Q$2:INDEX(Q:Q,MATCH(DATEVALUE("9/2/20"),A:A,0)),Q2&"",$R$2:INDEX(R:R,MATCH(DATEVALUE("9/2/20"),A:A,0)),R2&"",$S$2:INDEX(S:S,MATCH(DATEVALUE("9/2/20"),A:A,0)),S2&"",$T$2:INDEX(T:T,MATCH(DATEVALUE("9/2/20"),A:A,0)),T2&"")
 
Upvote 0
Hi vladi305,

Do the range arguments need to be the same size too? For instance, all other range arguments are from row 2 to row 340, but for column P it is matching a date so it might be P2:P300.

Just a thought,

Doug
No, I'm looking for a range from two specific dates to today and then since last year, last 6 months, last 3 months. Thanks anyway for trying
 
Upvote 0
It looks like you adjusted the formula to use the same range size for all of the range arguments.
 
Upvote 0

Forum statistics

Threads
1,215,180
Messages
6,123,502
Members
449,100
Latest member
sktz

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