Results 1 to 7 of 7

Check if a range has data in condition to a cell

Threaded View

  1. #1
    Registered User
    Join Date
    11-17-2010
    Location
    Patras, Greece
    MS-Off Ver
    Excel 2003
    Posts
    11

    Check if a range has data in condition to a cell

    In a sheet a user enters data in a range, say A1 to F5. In column A the user selects an item from a named list (via Data\Validation\List) with text values. Then, in columns B to F the user enters numbers. In any row he may enters 1,2,3,4,5 numbers or none. When he finishes he clicks a button with name 'Confirm' that saves the data and makes some calculations.
    What I want is a macro to run after button click that:
    1) If the user selects a value in A and doesn't enter number in any of the cells that are in the same row (I mean if he leaves a row only with data in A, without at least one number in adjacent cells of columns B to F), a stop explaining message to be appeared and prompt him to correct it.
    2) If the user enters number or numbers in any cell of the range B1 to F5 and omits to select an item in A, again a stop message to be appeared.

    Notice that in all the cells there's Conditional Formatting (font, pattern etc.) with all 3 conditions (Excel 2003).

    Thanks in advance...
    Last edited by agios59; 11-18-2010 at 03:22 PM.

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