Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: New York City
Posts: 7
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent duplicate entries in Excel 2000 Stressed Excel Discussion (Misc queries) 11 January 28th 08 09:07 AM
How do you prevent duplicate entries in an excel spreadsheet? Kruser Excel Discussion (Misc queries) 2 November 16th 05 10:14 PM
Adding Consecutive Entries FLKULCHAR Excel Discussion (Misc queries) 1 June 3rd 05 04:48 PM
Adding Consecutive Entries FLKULCHAR Excel Discussion (Misc queries) 0 June 3rd 05 05:08 AM
Prevent duplicate entries Teri Excel Worksheet Functions 1 March 4th 05 01:28 AM


All times are GMT +1. The time now is 05:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"