Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    controll blank cells (2000 sr 1)

    Is possible to controll (in VBA) this condition:
    If in Column J (from j6 to j45) is present a value the cells in the range V, W, and X are required....
    Example:

    J6 is filled, cells V6, W6 and X6 are required to be fill... if not appear MSG BOX "DATO OBBLIGATORIO" and goto the first cell from range V:W not filled

    J7 is filled, cells V7, W7 and X7 are required to be fill... if not appear MSG BOX "DATO OBBLIGATORIO" and goto the first cell from range V:W not filled

    ... if the condition is estabilished for all cells into range j6 to j45 all is ok.
    ecc.....

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: controll blank cells (2000 sr 1)

    You can use a macro like this:

    Sub CheckFilled()
    Dim lngRow As Long
    Dim lngCol As Long
    For lngRow = 6 To 45
    If Not Cells(lngRow, 10) = "" Then ' J = 10
    For lngCol = 22 To 24 ' V to X
    If Cells(lngRow, lngCol) = "" Then
    Cells(lngRow, lngCol).Select
    MsgBox "Dato obbligatorio, stupido!", vbExclamation
    Exit Sub
    End If
    Next lngCol
    End If
    Next lngRow
    End Sub

    Copy the macro into a standard module.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: controll blank cells (2000 sr 1)

    Tks, and "Bravo!" for your italian.
    Sal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •