Make INDIRECT reference dynamic

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
793
Office Version
  1. 365
Platform
  1. MacOS
Hi,

I have a number of very similar INDIRECT formulas in a spreadsheet, example of one below:

=SUM(COUNTIF(INDIRECT({"L4","T4","AB4","AJ4","AR4","AZ4","BH4","BP4","BX4","CF4","CQ4"}),"No"))

I'm using the INDIRECT function as I want to count if what's in non-adjacent cells meets the criteria "No". These work, however, the reference aren't dynamic. Is there a better way that I could do this so that whenever I happen to insert new columns in spreadsheet, I don't have to go in and update all of these references? perhaps with some form of COUNTIF / COUNTIFS?

Thanks in advance.

Olly.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
It converts True/False to a number. So 1/0. This way you can use sum

"--" is actually two times minus 1. Double minus = positive : )
 
Upvote 0
It converts True/False to a number. So 1/0. This way you can use sum

"--" is actually two times minus 1. Double minus = positive : )
I'm trying this but getting a message saying the formula is missing something and it won't let me enter it. Do you know what's going wrong with it, please?

=SUM(COUNTIF(--VSTACK(I4,Q4,Y4,AG4,AO4,AW4,BE4,BM4,BU4,CC4,CN4),1)

So, I am trying to count wherever the cells I4, Q4, Y4, AG4, AO4, AW4, BE4, BM4, BU4, CC4 and CN4 are =1 and then sum these together.

Screenshot 2023-12-18 at 15.22.53.jpg


Thanks again.
 

Attachments

  • Screenshot 2023-12-18 at 15.22.18.png
    Screenshot 2023-12-18 at 15.22.18.png
    141.4 KB · Views: 6
Upvote 0
Are all those cells just 1 or 0?
 
Upvote 0
If they are either * or null why are your trying to do a countifs equal to 1
 
Upvote 0
If they are either * or null why are your trying to do a countifs equal to 1
Yes, it should be looking for *, I just quickly put that in for this example and realised it was *, not 1, for this example afterwards. That doesn't affect the formula not working though, it'd work, but just always give 0?
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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