+ Reply to Thread
Results 1 to 2 of 2

Prevent Consecutive Entries

  1. #1
    JorgeAE
    Guest

    Prevent Consecutive Entries


    I would like to design a frmua to prevent to have 4 consecutive entries
    of the same name:

    B4 = Peter or any name
    C4 = Peter or any name
    D4 = Peter or any name
    or
    B4 = Peter or any name
    C5 = Peter or any name
    D6 = Peter or any name

    When I reach E7 = Peter (or any name) - I would like a validation
    formula to prevent me from additing the person 4 times. This fromula
    shouls be in the range of B4:BA69. The name could appear 29 times but
    not in more that 3 a consecutive times.


    --
    JorgeAE

  2. #2
    Ron Coderre
    Guest

    RE: Prevent Consecutive Entries

    Try this:

    Select B4:BA69, with cell B4 as the active cell

    From the Excel main menu:
    <data><validation>
    Allow: Custom
    Formula:
    =AND(COUNTIF(OFFSET(B4,,-MIN(COLUMNS($B:B)-1,3),1,MIN(COLUMNS($B:B),4)),B4)<4,COUNTIF(OFFSET(B4,-MIN(ROWS($4:4)-1,3),,MIN(ROWS($4:4),4),1),B4)<4)

    Note_1: In case screen wrap impacts the display, there are NO spaces in that
    formula.

    Note_2: Data Validation won't trap copy/paste errors, but it WILL catch
    input errors

    Is that something you can work with?
    ***********
    Regards,
    Ron

    XL2002, WinXP


    "JorgeAE" wrote:

    >
    > I would like to design a frmua to prevent to have 4 consecutive entries
    > of the same name:
    >
    > B4 = Peter or any name
    > C4 = Peter or any name
    > D4 = Peter or any name
    > or
    > B4 = Peter or any name
    > C5 = Peter or any name
    > D6 = Peter or any name
    >
    > When I reach E7 = Peter (or any name) - I would like a validation
    > formula to prevent me from additing the person 4 times. This fromula
    > shouls be in the range of B4:BA69. The name could appear 29 times but
    > not in more that 3 a consecutive times.
    >
    >
    > --
    > JorgeAE
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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