+ Reply to Thread
Results 1 to 6 of 6

Warning for Consecutive repeated entries

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Bridgend, South Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    10

    Warning for Consecutive repeated entries

    Hi All, new member with a problem please!

    I have a spreadsheet which is basically a combined machine log - column A is the name of the machine, columns B-Y contain information about the setup of the machine, and then column Z is a numeric 'result'.

    What I would like to acheive is to have some kind of warning to popup if there are 3 consecutive entries of the same machine name and a result of "0".

    Capture.JPG

    So there would be a warning message now because a user had entered "SL3" as the machine and "0" as the result 3 times consecutively.

    Thanks in advance for any help!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Warning for Consecutive repeated entries

    Hi, and welcome to the forum.

    I'd be inclined to use a helper column which counts the number of occurrencies of each value, then in a cell above the column use a
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    formula to find the maximum number.

    Wrap that MAX function inside an INDEX() function which will return the cell that has a maximum value and use a conditional format to highlight the cell if the count is greater than 3

    You could also use a VBA approach to pop up a message box.

    Please note. Don't upload pictures. We always prefer the actual workbook
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Warning for Consecutive repeated entries

    Pop up can be done with data validation
    select the column Z then go to data validation
    select custom and enter below
    =COUNTIFS($A$1:$A1,$A1,$Z$1:$Z1,$Z1)<=3
    go to error alert select warning from drop down and Type the title you want and message you want if you want to restrict the user to put the data then select stop.

    In attached file data validation is in column B1 to B23.
    Attached Files Attached Files
    Last edited by hemesh; 04-01-2014 at 05:55 AM.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  4. #4
    Registered User
    Join Date
    04-23-2013
    Location
    Bridgend, South Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Warning for Consecutive repeated entries

    Thanks Guys for the quick responses and sorry Richard for the pic!

    These work OK for finding 3 repeats in the entire list, but all I want to do is to warn if there are 3 consecutive repeated entries of the same machine name and and "0" result..

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Bridgend, South Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Warning for Consecutive repeated entries

    I attached a simplified version of the workbook - in the example you can see that there are 4 instances of the machine being 'SL3' and a result of "0", but only the last 3 entries for the 'SL3' machine are consecutive. This is when I need a warning to appear. Thanks, hope this explains more clearly!
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Warning for Consecutive repeated entries

    Hi,

    See attached.
    Attached Files Attached Files

+ 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. Lookups on repeated entries!
    By martin.mcgarry in forum Excel General
    Replies: 4
    Last Post: 06-18-2010, 10:23 AM
  2. mark data repeated in consecutive cell in a column
    By seafarer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-25-2008, 02:57 AM
  3. counting consecutive repeated values in a column along with the range
    By g s in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2005, 04:05 PM
  4. [SOLVED] HOW DO I GET A WARNING FOR REPEATED NUMBERS
    By Kenya in forum Excel General
    Replies: 4
    Last Post: 04-05-2005, 03:06 AM
  5. [SOLVED] how do i get a warning for repeated numbers
    By Kenya in forum Excel General
    Replies: 1
    Last Post: 04-04-2005, 09:06 AM

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