Make INDIRECT reference dynamic

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
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.
 
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'll actually be * and 0, as I have set the cell put in a 0 if it's null
Screenshot 2023-12-18 at 15.51.10.png
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
In that case it should be
Excel Formula:
=SUM(--(VSTACK(I4,Q4,Y4,AG4,AO4,AW4,BE4,BM4,BU4,CC4,CN4)="*"))
 
Upvote 0
Solution
In that case it should be
Excel Formula:
=SUM(--(VSTACK(I4,Q4,Y4,AG4,AO4,AW4,BE4,BM4,BU4,CC4,CN4)="*"))
Thanks.

The "Reverse Dish?" column is almost exactly the same, except it uses "#" and "0", instead of "*" and "0". so this will be the same solution.

The "Won Lag?" and "Broke?" columns have three possibilities: "Yes", "No" and "U/K". The U/K option is short for unknown, as quite often it isn't known whether they did or did not break, but there needs to be an entry in the box.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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