reference column from another cell

tmmellor1981

Board Regular
Joined
Jan 18, 2009
Messages
122
I've scoured the forums and google put perhaps not searching for the correct question. I have the following formula:

=COUNTIFS(Account_Opened!$B:$B,">="&$BE$91,Account_Opened!$B:$B,"<"&$BI$91,Account_Opened!$P:$P,$BC94)

I have a box that populates me a list of ranges and would like the $P:$P part of the formula to change to whatever is in that cell e.g one of the following
$P:$P
$Q:$Q
$R:$R

or if there is a way of using a column number somehow.

many thanks and i'm sure as usual a guru will find this one easy :)
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try
A1 is the cell that contains $P:$P etc

=COUNTIFS(Account_Opened!$B:$B,">="&$BE$91,Account_Opened!$B:$B,"<"&$BI$91,indirect("Account_Opened!"&A1),$BC94)

Edit : Missed the ) after A1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,069
Messages
6,128,599
Members
449,460
Latest member
jgharbawi

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