Closed Thread
Results 1 to 5 of 5

Thread: Locating a specific event in column

  1. #1
    Registered User
    Join Date
    05-16-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    6

    Red face Locating a specific event in column

    I have a column of numbers:
    1
    2
    4
    2
    3
    5
    7
    8
    6
    9

    Starting from the beginning of the list, I need to be able to find the first and second events where 1 minus the next number equals -4 (1 - 5 = -4). At this point, I will reset the starting point at 5 and repeat the processs (5 - 9 will again equal -4) so I will also need to be able to find 9. It may be important to keep in mind that this list is a random flow of positive and negative numbers so the next number I need to identify my be 4 units smaller (9-4=5).

    Thanks in advance...
    Dana

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK - but currently in Tokyo
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,554

    Re: Locating a specific event in column

    Hi,

    How about with your numbers starting in A2.

    B1: =A2, 
    B2: =IF(B1-A2=-4,A2,B1)
    C2: =IF(B2<>B1,"Event"&COUNTIF(C1:C$2,"=Event*")+1,"")
    then copy B2:C2 down your list.

    HTH
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  3. #3
    Registered User
    Join Date
    05-16-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    6

    Smile Re: Locating a specific event in column

    Richard -- THANKS -- nice and simple solution
    Last edited by shg; 05-16-2010 at 03:26 PM. Reason: deleted spurious quote

  4. #4
    Registered User
    Join Date
    05-16-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    6

    Red face Re: Capturing a value from a column or array

    I have one cell in a report and would like to put the value associated with Event 1 (value = 4) in that cell. I also have another cell that will have the value for Event 2 (value = 8) in that cell. Any suggestions on how to perform that task would be greately appreciated.

    _____A______B
    1
    2
    3
    4____4____Event 1
    5
    6
    7____8____Event 2
    8

    Thanks in advance,
    Dana
    Last edited by dclarke; 05-16-2010 at 04:02 PM.

  5. #5
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,759

    Re: Locating a specific event in column

    Please start a new thread for your new question.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

Closed 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.2.0