sample.xlsxHi,
I've been using Excel lately to do some analysis on a table with numerical data for the different days of the week. I've been stuck on the following problem for a while now, so hopefully someone here has a quick solution:
I want to count the occurence of a certain value (using COUNTIF?), but only in columns that have a specific value on the first row. Which columns to include varies for each worksheet, so I want Excel to find them for me automatically. In other words: the range in my COUNTIF is a selection of columns, based on a specific value.
In pseudocode:
for each column in worksheet
if column contains value 'friday' on row 1
count number of occurences of value '-1' in this column
The total would be all occurences of the value -1 in the columns that contain the value 'friday' on row 1. The occurences of -1 on rows with 'saturday' - 'thursday' should NOT be counted.
Anyone with a quick and fast solution?
Bookmarks