+ Reply to Thread
Results 1 to 2 of 2

How to use conditional statement

  1. #1
    Registered User
    Join Date
    05-07-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to use conditional statement

    Hi,

    Please cananyone help me on this issue.

    Present I have this. The total column adds up the mark of the student in all the subjects.
    Student Sub1 Sub2 Sub3 Sub4 Total
    S1 12% 38% 20% 20% 100%
    S2 13% 37% 19% 31% 100%
    S3 15% 15% 15% 15% 100%


    This is what I want. As a user, I can enter only 100 in any one of the subject and this would automatically lock the rest of the cells. I want to do this only for few students and not for all.

    Student Sub1 Sub2 Sub3 Sub4 Total
    S1 0% 100% 0% 0% 100%
    S2 0% 0% 100% 0% 100%
    S3 0% 0% 0% 0% 100%

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: How to use conditional statement

    Hi,

    assuming that your Sub1 to Sub4 is in Column B to column E:

    Select Cells B to E in the row that you want to apply the check, then click Data - Validation, select Custom and enter the formula

    =SUM($B2:$E2)<=100%

    The above formula is for row 2. Click the Error Alert tab to enter a meaningful error message if needed.

    You can easily copy the validation to another row by using Paste - Special and tick Validation.

    hth

+ 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