Can you reference "relative" column heading names in a formula?

trishcollins

New Member
Joined
Jan 7, 2006
Messages
37
I have a table that uses the countifs formula in each cell, that references the contents of the table column heading name and the data in the first column as criteria and counts up items in the second table (Deliverable Assignments) if they match both.

I am currently using the absolute row and relative column cell address for the heading rather than the actual table header name, ie. "[[#headers][Guideline]]" for two reasons. The first is that I want to copy the formula to all subsequent columns, and don't want to edit each column to reflect the new heading name for that column, and the second is the column titles will change over time and I don't want to have to keep changing the formulas. I also want to copy the table to other locations, and want to ability to be able use it without having to change the formulas.

Here is the current formula (note that for the heading, I am looking for the text string to be contained within the column in the other table, not an exact match, ie "IP Addressing Guideline" would be counted.

=COUNTIFS(Deliverable_Assignments[Status],[@Status],Deliverable_Assignments[Deliverable],"*"&B$24&"*")

How to I reference the contents of the header of the column relative to the cell column the formula is in?

Trish :)
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
RESOLVED Re: Can you reference "relative" column heading names in a formula?

I figured it out. Was even able to include the "title" which was also counting criteria.

=COUNTIFS(Deliverable_Assignments[Section],INDIRECT(ADDRESS(ROW(EA_Telecom[#Headers])-1,COLUMN(EA_Telecom[#Headers]))),Deliverable_Assignments[Status],[@Status],Deliverable_Assignments[Deliverable],"*"&INDIRECT(ADDRESS(ROW(EA_Telecom[#Headers]),COLUMN()))&"*")

Trish :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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