Newbie needs help please

dharker

New Member
Joined
Sep 23, 2013
Messages
4
Hi

I have an array of boxes corresponding to each day of the month, into which I enter periods of sickness/absence by marking each day off with an "S". I can then count the number of days sick quite happily. I've been asked to count the number of occasions of sickness now, for example a person could have a days sickness on the 5th then 3 days later in the month. Under these circumstances I would need a count of two PERIODS of absence along with the 4 days absence.

Could someone please help point me to the correct function or a method of doing this? I'm a newbie so have no VBA skills... (any great sources for learning VBA btw?)

Many thanks
Dave
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Assuming they are in a single row and that there is a column before the first entry that is not used to indicate sickness try:


=SUMPRODUCT(--(B2:O2="s"),--(A2:N2<>"s"))

[TABLE="width: 458"]
<tbody>[TR]
[TD="class: xl63, width: 64"] [/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"] [/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"] [/TD]
[TD="class: xl63, width: 19"] [/TD]
[TD="class: xl63, width: 19"] [/TD]
[TD="class: xl63, width: 19"] [/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 19"]s[/TD]
[TD="class: xl63, width: 64"] [/TD]
[TD="class: xl63, width: 64, align: right"]3[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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