+ Reply to Thread
Results 1 to 4 of 4

Finding the Difference between "random" cells

  1. #1
    Registered User
    Join Date
    07-13-2018
    Location
    United States
    MS-Off Ver
    2016
    Posts
    2

    Finding the Difference between "random" cells

    I have a column of numbers. Every so often there is a blank cell with no number. I am trying to write a formula that will output the difference between the number right before a blank cell . . . and the number that followed the previous blank cell. Any ideas as to how to accomplish this in a faster/more productive way without manually doing this for each grouping is appreciated. Thank you.
    Example.PNG

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Finding the Difference between "random" cells

    Hi kcrasch. Welcome to the forum.

    I do not see how you are getting those numbers.

    Since you already have a workbook with data please upload a sample workbook so we can see all of this in context.

    If you do not know how to do this:


    To attach a file to your post: (Please no pics or screenshots ... saves retyping data.),
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    07-13-2018
    Location
    United States
    MS-Off Ver
    2016
    Posts
    2

    Re: Finding the Difference between "random" cells

    Here is an actual workbook with the type of numbers I need to generate. The numbers in the far right cell are the difference between groups of numbers in the far left cell.
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Finding the Difference between "random" cells

    B
    C
    D
    E
    F
    1
    E1: =IF(OR(B1 = "", B2 <> ""), "", B1 - INDEX(B:B, LOOKUP(9E+307, ROW(B$1:B1)/(B$1:B1="")) + 1))
    2
    122+67.14
    3
    192+87.00
    7019.86
    4
    5
    194+07.30
    6
    253+84.85
    5977.55
    7
    8
    266+08.49
    9
    292+84.80
    10
    294+45.53
    2837.04
    11
    12
    301+08.87
    13
    326+18.71
    14
    333+19.21
    3210.34
    15
    16
    341+62.52
    17
    351+64.97
    1002.45
    18
    19
    357+81.64
    20
    364+70.20
    688.56


    Your choice of number formats in col B made the question needlessly cryptic.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 08-13-2014, 02:16 PM
  2. Replies: 12
    Last Post: 06-12-2014, 02:11 PM
  3. wanting to clear cells that contain "MO -" + random name
    By indiana115 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2014, 11:13 AM
  4. Replies: 3
    Last Post: 01-02-2014, 02:15 PM
  5. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  6. Replies: 9
    Last Post: 07-05-2012, 03:28 PM
  7. [SOLVED] Search a random array of cells and return a value of "X"
    By EKB in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-16-2006, 11:10 PM

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