Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]() |
|||
|
|||
![]() Quote:
Many thanks for your input. However, this is returning a question for every line even though they are either full or empty. The macro must look at all full cells on A1:A10 and then if A1 has text or data then B1 must have numeric value, if A2 has text or data then B2 must have numeric value and so on until last empty line found. If possible a input box, with the possibility of Cancel, asking for value and then macro would fill in the empty cell. Hope anybody out there has got the answer for this one. Many thanks for your time and a very nice weekend to everybody. Cheers, Albert |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi Alberto,
Am Fri, 8 Mar 2013 20:10:35 +0000 schrieb Alberto Viveiros: The macro must look at all full cells on A1:A10 and then if A1 has text or data then B1 must have numeric value, if A2 has text or data then B2 must have numeric value and so on until last empty line found. try: For Each rngC In Range("A1:A12") If Len(rngC) = 0 Then ElseIf 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check values in each column | Excel Programming | |||
Subtotals of Items in A Column based on Spec. Values found in Colu | Excel Discussion (Misc queries) | |||
Loop through column(s) to check values, perform action based on check | Excel Programming | |||
Search Column, If match found then add two values. | Excel Programming | |||
URGENT -- search in string for a value in another column, if found, return value from next column | Excel Programming |