View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Check for values in column A and if found then column B must have value.

Hi Alberto,

Am Fri, 8 Mar 2013 11:17:34 +0000 schrieb Alberto Viveiros:

for each cel in range("a:a")
if isempty(cel) then exit for ' finish on empty cell
if isempty(cel.offset(,1)) then cel.offset(,1).value = msgbox("enter
a quantity for " & cel)
next


try:
Dim rngC As Range

For Each rngC In Range("A1:A12")
If IsEmpty(rngC.Offset(0, 1)) Then
MsgBox "enter a quantity for " & _
rngC.Offset(0, 1).Address(0, 0)
End If
Next


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2