Hello, I need to count the number of times the letter C appears in a range of cells but i need to excelude the duplicate values out of that count.
Let me explain this better:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]day1[/TD]
[TD]day2[/TD]
[TD]day3[/TD]
[TD]day4[/TD]
[TD]day5[/TD]
[TD]day6[/TD]
[TD]day7[/TD]
[TD]day8[/TD]
[/TR]
[TR]
[TD]08:00[/TD]
[TD]16:00[/TD]
[TD]a[/TD]
[TD]a[/TD]
[TD][/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16:00[/TD]
[TD]24:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
in this table the letter "A" shows 2 times on diferent columns, so the person worked 2 days. The letter "B" shows 2 times but I need it to count as one time so it shows as the person worked different shifts in that day.
so, if I have this:
[TABLE="width: 500"]
<tbody>[TR]
[/TR]
[TR]
[TD][/TD]
[TD]day1[/TD]
[TD]day2[/TD]
[TD]day3[/TD]
[TD]day4[/TD]
[TD]day5[/TD]
[TD]day6[/TD]
[TD]day7[/TD]
[TD]day8[/TD]
[/TR]
[TR]
[TD]08:00[/TD]
[TD]16:00[/TD]
[TD]a[/TD]
[TD]a[/TD]
[TD][/TD]
[TD]b[/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16:00[/TD]
[TD]24:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]b[/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need the person as letter "B" to show as working 2 days (count it as 2 times) and not count the letter 4 times.
This is based on a COUNTIF formula.
If there a way to do this with a simple formula or vba?
Best regards,
eLy
Let me explain this better:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]day1[/TD]
[TD]day2[/TD]
[TD]day3[/TD]
[TD]day4[/TD]
[TD]day5[/TD]
[TD]day6[/TD]
[TD]day7[/TD]
[TD]day8[/TD]
[/TR]
[TR]
[TD]08:00[/TD]
[TD]16:00[/TD]
[TD]a[/TD]
[TD]a[/TD]
[TD][/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16:00[/TD]
[TD]24:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
in this table the letter "A" shows 2 times on diferent columns, so the person worked 2 days. The letter "B" shows 2 times but I need it to count as one time so it shows as the person worked different shifts in that day.
so, if I have this:
[TABLE="width: 500"]
<tbody>[TR]
[/TR]
[TR]
[TD][/TD]
[TD]day1[/TD]
[TD]day2[/TD]
[TD]day3[/TD]
[TD]day4[/TD]
[TD]day5[/TD]
[TD]day6[/TD]
[TD]day7[/TD]
[TD]day8[/TD]
[/TR]
[TR]
[TD]08:00[/TD]
[TD]16:00[/TD]
[TD]a[/TD]
[TD]a[/TD]
[TD][/TD]
[TD]b[/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16:00[/TD]
[TD]24:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]b[/TD]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need the person as letter "B" to show as working 2 days (count it as 2 times) and not count the letter 4 times.
This is based on a COUNTIF formula.
If there a way to do this with a simple formula or vba?
Best regards,
eLy
Last edited: