I have a COUNTIF formula that counts a particular value across a range of columns in each row. However, I would like to exclude the cell values in a particular column based on the column header.
For example, I need to count the number of cells that contain the value 'NS' across a range 'C:Z' for each row in the worksheet. However, I need to exclude the values in cells that have a column header 'RC'. The challenge is, I cannot control where these 'RC' columns appear in the range. Therefore, I am looking for some mechanism through which I can check whether the column header is 'RC' or not, and if it is, then exclude the cell values from the COUNTIF formula.
Is there anyway to do this?
=COUNTIFS(C1:Z1,"<>RC",C2:Z2,"NS")
? - BigBen