Results 1 to 5 of 5

Thread: Subtraction of cells in alternating ranges
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jan 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Subtraction of cells in alternating ranges

    Hello,

    I am looking for a solution preferably with formulas or in vba.

    Need something to be able to calculate the cycle times in column 8 below by subtracting the finish time from the start time for each cycle.
    The cycles vary in cell row ranges so I'm not sure how to go about this. Thought of using count blanks formula but can't figure it out.
    Help appreciated.

    [IMG][/IMG]

  2. #2
    Board Regular steve the fish's Avatar
    Join Date
    Oct 2009
    Location
    Midlands, UK
    Posts
    7,671
    Post Thanks / Like
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Subtraction of cells in alternating ranges

    Hi. Try this:

    =IF(A2="finish",G2-LOOKUP(2,1/($A$2:A2="start"),$G$2:G2),"")

  3. #3
    New Member
    Join Date
    Jan 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Subtraction of cells in alternating ranges

    Quote Originally Posted by steve the fish View Post
    Hi. Try this:

    =IF(A2="finish",G2-LOOKUP(2,1/($A$2:A2="start"),$G$2:G2),"")
    Hi,

    Thanks but this is returning a #N/A error not sure what this means.

  4. #4
    Board Regular steve the fish's Avatar
    Join Date
    Oct 2009
    Location
    Midlands, UK
    Posts
    7,671
    Post Thanks / Like
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Subtraction of cells in alternating ranges

    Which cell is the top left cell from that image?

  5. #5
    New Member
    Join Date
    Jan 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Subtraction of cells in alternating ranges

    I see the problem now, works perfect thanks!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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