+ Reply to Thread
Results 1 to 10 of 10

Need to delete Duplicate active cell in ROW (ROOM or Subject)

  1. #1
    Registered User
    Join Date
    02-06-2022
    Location
    Sri lanka
    MS-Off Ver
    365
    Posts
    6

    Lightbulb Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Hello,
    Thanks lot your Interest about my Problem and also appreciate your support.

    I have excel sheet I need to prevent duplicate entry on SUB or ROOM in one ROW.

    As example after I enter RM# as 1 in E4, This need to stop pick the room 1 in entire Row, also I link through data Validation .

    if Some one pick the RM# 1 in Cell Q1, That Cell need to delete by popping up Error of " Entering Duplicate value not allowed"


    also need to do same for Subject ("SUB" )as well.

    Best regard

    Indika
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    For any of these, use the custom formula option of Data Validation, with a formula like this (select all the cells with D4 as the active cell)

    =COUNTIF(4:4,D4)=1

    Change the error/entry messages to suit.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    02-06-2022
    Location
    Sri lanka
    MS-Off Ver
    365
    Posts
    6

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Hello,
    Thanks lot for your respond, Yes I found the same solution earlier as well.
    I need to keep my data validation for select the subject and Room, But if I use this formula for data validation I can not do that.

    So I need to keep my data validation as its and Duplicate control need to do using VBA.

    Thanks Again

    Best regard
    Indika

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    1) Copy this code.
    2) Right-Click the sheet tab of interest.
    3) Select "View Code"
    4) Paste the code into the window that appears.
    5) Save the file as a macro-enabled .xlsm file.
    6) Make changes as needed

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-06-2022
    Location
    Sri lanka
    MS-Off Ver
    365
    Posts
    6

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Dear Bernie,
    Thank lot for the all support because it is working well.
    if Possible Please help to get this same result only for E, G, I , K, M, O, Q and S (Which mention only Room # - RM# in Row 3)

    Best regard
    Indika

  6. #6
    Registered User
    Join Date
    02-06-2022
    Location
    Sri lanka
    MS-Off Ver
    365
    Posts
    6

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Hello Bernie,
    I just check it Properly, So it crashing with date and week number, So please help to support to apply for range D:S as one option.

    Also as I mention above as 2nd Option need to apply the only for RM# Column.

    So sorry for the confusion

    Best regard
    Indika

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-06-2022
    Location
    Sri lanka
    MS-Off Ver
    365
    Posts
    6

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Dear Bernie,
    Thanks lot for all support, it working well.

    Best regard
    Indika

  9. #9
    Registered User
    Join Date
    02-06-2022
    Location
    Sri lanka
    MS-Off Ver
    365
    Posts
    6

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    Dear Bernie,
    So sorry to come back to you again,
    Because in My Excel i am having heading till 3rd Row,
    So I Try to use a different heading to Overcome to from this But it not help to get final format.

    So please Help me to take out the 1st 3 Rows from Equation

    Then Final formula need to Skip first 3 Column, and Then need to apply "E:E, G:G, I:I , K:K, M:M, O:O, Q:Q, S:S"

    In the mean time if you can help me to select only Specify Rows Range like 4:1000, That also Help.

    Best regard
    Indika

  10. #10
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Need to delete Duplicate active cell in ROW (ROOM or Subject)

    The final code does skip the first 3 columns - this also skips the first 3 rows:

    Please Login or Register  to view this content.

+ 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. [SOLVED] If date matches and room matches, return room info in to cell
    By HonorBray in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-12-2018, 12:09 PM
  2. [SOLVED] How to Calculate Hotel room nights booked, for each night, and broken down by room type?
    By salsadantzr in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-09-2018, 04:53 PM
  3. [SOLVED] Help comparing two files by subject+Date, subject+DatePlus1, Subject+DateMinus1
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-11-2017, 07:37 AM
  4. Room Allotment:remove allotted room from dropdown list
    By amdrosm in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-05-2017, 04:50 AM
  5. Duplicate message alert with room booking form and calendar
    By chillz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2017, 07:37 AM
  6. [SOLVED] Delete rows based on duplicate cell, but leaving first and last duplicate.
    By LadyNicole in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2013, 05:07 AM
  7. Replies: 1
    Last Post: 05-11-2011, 07:11 AM

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.6.0 RC 1