+ Reply to Thread
Results 1 to 5 of 5

Prevent from doing double entries On Column (G & H) through VB/Macro

  1. #1
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Prevent from doing double entries On Column (G & H) through VB/Macro

    Greetings to all,

    i want help on my excel file plz...

    i want a VB/Macro Code which Prevent from doing double entries On Column (G & H) through VB/Macro

    plz see the sample image attachment

    Prevent from doing double entries.jpg

    i have also attach the excel file

    Prevent from doing double entries.xlsx

    any help will be highly appreciated

    Regards

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Prevent from doing double entries On Column (G & H) through VB/Macro

    Why do you need VBA for this?

    is it only 1 you dont want duplicated?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Prevent from doing double entries On Column (G & H) through VB/Macro

    thanks for quick reply

    What I m trying to do is in my salary sheet, if someone enter "Present 31" and he got "leave (Zero)" and he have "1 Leave Allowed" than his total "Earn Days" will become "32"

    & same if he got "leave (Zero)" and he have "1 Leave Allowed Not Availed" than his total "Earn Days" will also become "32"

    But Actual Problem is i want to Prevent from doing double entries On Column (G & H) through VB/Macro

    so that "Earn Days" should not exceed from "32"

    for this i need a VB/Macro Code

    many Thanks

    Regards

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Prevent from doing double entries On Column (G & H) through VB/Macro

    You didnt really answer my 1st question...
    for this i need a VB/Macro Code
    Why do you feel you need VBA for this?

  5. #5
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Prevent from doing double entries On Column (G & H) through VB/Macro

    Finlay i have come with the Solution from Prevent doing double entries On Column (G & H) through Data Validation

    1. Select your range starting with row 8. Say this is G8:H100.

    2. Go to Data tab > Data Validation > Data Validation

    3. Select Custom in Allow: field and put following formula in Formula:

    =SUM($G8:$H8)<=1


    You didnt really answer my 1st question...


    Why do you feel you need VBA for this?

    Because i thought its only possible with VBA Code


    "FDibbins" thanks for ur reply

    Regards

+ 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. How To Prevent Duplicate URL Entries in the Cell in a Column?
    By kalucharan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2014, 03:54 AM
  2. Need a real time macro to prevent the duplicate entries between multiple worksheets
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2013, 07:07 AM
  3. macro to prevent double record data
    By oxxy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-13-2013, 05:58 PM
  4. Replies: 0
    Last Post: 06-14-2012, 12:38 PM
  5. prevent userform double entries via vba coding
    By lilsnoop in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-06-2011, 05:53 PM

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