+ Reply to Thread
Results 1 to 4 of 4

Basing a formula on an unknown number of rows

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Basing a formula on an unknown number of rows

    I'm not sure if this can even be done, but I've certainly had a lot of trouble working it out.

    Simply, I have a column with time, and another for which I have marked a 1 saying something is happening (this is based on a large number of pictures I have collected for my PhD) or empty for no activity. I am trying to calculate the length of time that there are consecutive pictures, which is easy enough on its own but I was wondering if there was a formula I could use to save me a bit of time.

    Basically; if a cell contains a 1 then count the number of cells above it which contain a value and use that to work out the time from that column.

    It feels like something which can be done but maybe its just wishful thinking and I certainly can't work it out.

    Thanks very much
    Lily

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Basing a formula on an unknown number of rows

    Hi Lily,

    Welcome to the forum.

    Basically; if a cell contains a 1 then count the number of cells above it which contain a value and use that to work out the time from that column.
    Can you post a sample workbook.. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Basing a formula on an unknown number of rows

    HELP.docx

    I'm sorry, I don't know if that worked?

    Hopefully you can see what I mean, I've highlighted the relevant columns as there's quite a lot going on.

    Thanks
    Lily

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Basing a formula on an unknown number of rows

    If you add you're excel file, we can also test the solution.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1