Hi Azeema, Have a look at the attached to see if it meets your needs. The formula is really cumbersome, but it's all I can think of at the moment. Regards - Dave.
From: aze...@gmail.com Date: Tue, 19 Jul 2011 23:44:14 -1000 Subject: $$Excel-Macros$$ adding adjacent (contagious) cells only To: excel-macros@googlegroups.com Dear Experts: Let me see if I can explain this to you. I am working on a research project which relates to time use from 6am to 12 pm, by different activities. (see attached data for a selected no of respondents for Unpaid Work only). I would like to calculate "segments of time" or unbroken chain of time spent on an activity. For example, if someone reported yes (for unpaid work) at 7 am then another yes at 12 pm and then at 3 pm, that is obviously 3 segments of time reported for Unpaid work. But if someone reports unpaid work at 7 am and it goes on till 10 am it is the same number of hours but only 1 segment! While I can calculate the amount of total time a person has spent on an activity, I cannot come up with the formula to calculate the number of segments for each row (respondent). Can someone help me count the SEGEMENTS of time? Many thanks in advance. Azeema -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
UnpaidWorkSegmants.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet