Count of attribute entries for a dynamic column in a file

Peter Davison

Active Member
Joined
Jun 4, 2020
Messages
444
Office Version
  1. 365
Platform
  1. Windows
I’ve got this formula that counts the number of attributes in a column which is okay when I knew which column the attribute heading was in, but now it has become variable.

This is my current formula in a cell –

=SUM(IF(ISTEXT('BCP Raw Product'!$E$2:$E$1000),1/COUNTIF('BCP Raw Product'!$E$2:$E$1000, 'BCP Raw Product'!$E$2:$E$1000),""))+3

I have worked out a formula which matches the attribute name and returns me the column address, but when I try and replace in the original formula it does not like it. I am sure it’s down to brackets and quotes.

="'BCP Raw Product'!$"&CHAR(65-1+MATCH($D42,'BCP Raw Product'!$A$1:$Z$1,0))&"$"&2&":"&"$"&CHAR(65-1+MATCH($D42,'BCP Raw Product'!$A$1:$Z$1,0))&"$"&1000

Returns this –

'BCP Raw Product'!$K$2:$K$1000

I then try to replace - 'BCP Raw Product'!$E$2:$E$1000 In the top formula for the 3 entries with the code above but doesn’t like it?

Would you know what I am doing wrong?

Thanks for your help
 

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).
How about
=SUM(IF(ISTEXT(INDEX('BCP Raw Product'!$A$1:$Z$1000,,MATCH($D1,'BCP Raw Product'!$A$1:$Z$1,0))),1/COUNTIFS(INDEX('BCP Raw Product'!$A$1:$Z$1000,,MATCH($D1,'BCP Raw Product'!$A$1:$Z$1,0)),INDEX('BCP Raw Product'!$A$1:$Z$1000,,MATCH($D1,'BCP Raw Product'!$A$1:$Z$1,0))),""))+3
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,984
Members
449,201
Latest member
Lunzwe73

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