+ Reply to Thread
Results 1 to 2 of 2

Loop to check condition of cells

  1. #1
    Registered User
    Join Date
    12-28-2009
    Location
    Atlanta, Ga
    MS-Off Ver
    Excel 2007
    Posts
    16

    Smile Loop to check condition of cells

    Hi,
    I'm looking for assistance with some code that I've been working on but haven't been able to get it to work. Column R is a calculated cell that adds percentages across the worksheet. I would like to prevent the responders from having a percentage over 100% in column R. For example, the value in R6 is currently 100% but if the responder changed V6 to 10% then the "Grand Total" would be 105%, which I'd like to have an error message displayed when a cell R6 and below are over 100%.

    There may be some additional rows added and I'd like to make sure that the code contains a variable to check every row in column R starting at row 6.

    The code I've tried is below:

    Please Login or Register  to view this content.
    Please let me know if there's any additional details that you'd need to know. Thank you in advance for taking a look at this.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Loop to check condition of cells

    Hi keith,
    Why not put a data validation in column R so values greater than 1 are not allowed? Look at Data Validation of Decimal and between 0 and 1.

    I may be off base on this answer but it was first to come to mind. I'd rather not have to write VBA if Excel can handle it in another way.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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