A
Alberto Viveiros
Hello everybody.
I have a macro that checks for column A2 to A12 and if data is foun
(text) the column B2 to B12 must have a numeric value.
In other words, if A2 has got text then B2 must have a numeric value an
so on, if not stop macro.
There is the following code;
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("ente
a quantity for " & cel)
next
there is one issue.
The macro is returning the error when finding a row with text and n
value on same line for column B but when I click OK it sends a 1 to th
empty field.
Can I have the focus set to the next empty cell please?
If possible when error found either focus on the empty cell or a msgBo
asking for the quantity and having it filling it up as going through al
the lines. Thank you.
I must say I thought this to be the most complicated code of all I hav
but is quite simple or I mean a few lines and its doing waht I though t
be many lines of code.
Thank you.
Alber
I have a macro that checks for column A2 to A12 and if data is foun
(text) the column B2 to B12 must have a numeric value.
In other words, if A2 has got text then B2 must have a numeric value an
so on, if not stop macro.
There is the following code;
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("ente
a quantity for " & cel)
next
there is one issue.
The macro is returning the error when finding a row with text and n
value on same line for column B but when I click OK it sends a 1 to th
empty field.
Can I have the focus set to the next empty cell please?
If possible when error found either focus on the empty cell or a msgBo
asking for the quantity and having it filling it up as going through al
the lines. Thank you.
I must say I thought this to be the most complicated code of all I hav
but is quite simple or I mean a few lines and its doing waht I though t
be many lines of code.
Thank you.
Alber