2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

COUNTIF in named column without knowing the row number

Good afternoon,

I am trying to perform a COUNTIF function within a named column, in this case it is “W/P REF” as the column name and it is finding the number of cells with “a.” in them as I have a wild car after the period. The initial issue I was trying to resolve were the columns changing orders, which is why I am having it look for a specific column header.

This is what I have that works: =COUNTIF(INDEX('SHEET1!A:FA,0, MATCH("W/P Ref", SHEET1'!4:4,0)),"a.*")

Now, I have resolved the “find this named column and do this COUNTIF”, but I came across a second issue. The column titles also change rows depending on how people set up their sheets. I tried giving the MATCH a range of rows to look in, but it only worked if I specified a row number, such as 4 in this case. Is there a better way to go about this, or will I be stuck with doing two index matches to locate the row then locate the column, then perform the COUNTIF?

Is there a better option than INDEX MATCH?

submitted by /u/StarFox311
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#rows.com
#row zero
#Excel alternatives for data analysis
#financial modeling with spreadsheets
#natural language processing for spreadsheets
#generative AI for data analysis
#Excel compatibility
#google sheets
#Excel alternatives
#COUNTIF
#named column
#INDEX
#MATCH
#wildcard
#column header
#formula
#column titles
#Excel functions
#dynamic column
#row number