Hi all,
I know exactly what I want to do but don't have a notion how to put the code together - if anyone can take a look at this I'd be extremely grateful - it's basically meant for a wargame for ships etc to restock with ammo/fuel etc.
In plain English what I need the macro to do:
If !Validator BS7 > 0 AND If !Validator DG7 = ‘@depot’<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
then<o></o>
If !Validator BT7 < !Validator CA7 <o></o>
then <o></o>
if !Ships $Q$6 > 0 add 1 to !Validator BT7 and subtract 1 from !Ships $Q$6 until either !Validator BT7 = !Validator CA7 OR !Ships $Q$6 = 0<o></o>
then <o></o>
If !Validator BU7 < !Validator CB7 <o></o>
then <o></o>
if !Ships $R$6 > 0 add 1 to !Validator BU7 and subtract 1 from !Ships $R$6 until either !Validator BU7 = !Validator CB7 OR !Ships $R$6 = 0<o></o>
then<o></o>
If !Validator BV7 < !Validator CC7 <o></o>
then <o></o>
if !Ships $S$6 > 0 add 1 to !Validator BV7 and subtract 1 from !Ships $S$6 until either !Validator BV7 = !Validator CC7 OR !Ships $S$6 = 0<o></o>
then <o></o>
If !Validator BW7 < !Validator CD7 <o></o>
then <o></o>
if !Ships $T$6 > 0 add 1 to !Validator BW7 and subtract 1 from !Ships $T$6 until either !Validator BWT7 = !Validator CD7 OR !Ships $T$6 = 0<o></o>
then<o></o>
If !Validator BX7 < !Validator CE7 <o></o>
then <o></o>
if !Ships $U$6 > 0 add 1 to !Validator BX7 and subtract 1 from !Ships $U$6 until either !Validator BX7 = !Validator CE7 OR !Ships $U$6 = 0<o></o>
then<o></o>
If !Validator BZ7 < !Validator CG7 <o></o>
then <o></o>
if !Ships $W$6 > 0 add 1 to !Validator BZ7 and subtract 1 from !Ships $W$6 until either !Validator BZ7 = !Validator CG7 OR !Ships $W$6 = 0<o></o>
then <o></o>
start again with !Validator BS8<o></o>
<o> </o>
notes<o></o>
<o> </o>
If !Validator BS7 is 0 or blank OR DG7 does not equal ‘@depot’ then do nothing<o></o>
At any other point where the value in !Ships = 0 OR the value in the two !Validator cells are equal do next<o></o>
The values mention for !Ship are fixed and won't change through the macro loop - i.e. even though the row in validator increments the row in ships never will<o></o>
As always any help greatly appreciated!
I know exactly what I want to do but don't have a notion how to put the code together - if anyone can take a look at this I'd be extremely grateful - it's basically meant for a wargame for ships etc to restock with ammo/fuel etc.
In plain English what I need the macro to do:
If !Validator BS7 > 0 AND If !Validator DG7 = ‘@depot’<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
then<o></o>
If !Validator BT7 < !Validator CA7 <o></o>
then <o></o>
if !Ships $Q$6 > 0 add 1 to !Validator BT7 and subtract 1 from !Ships $Q$6 until either !Validator BT7 = !Validator CA7 OR !Ships $Q$6 = 0<o></o>
then <o></o>
If !Validator BU7 < !Validator CB7 <o></o>
then <o></o>
if !Ships $R$6 > 0 add 1 to !Validator BU7 and subtract 1 from !Ships $R$6 until either !Validator BU7 = !Validator CB7 OR !Ships $R$6 = 0<o></o>
then<o></o>
If !Validator BV7 < !Validator CC7 <o></o>
then <o></o>
if !Ships $S$6 > 0 add 1 to !Validator BV7 and subtract 1 from !Ships $S$6 until either !Validator BV7 = !Validator CC7 OR !Ships $S$6 = 0<o></o>
then <o></o>
If !Validator BW7 < !Validator CD7 <o></o>
then <o></o>
if !Ships $T$6 > 0 add 1 to !Validator BW7 and subtract 1 from !Ships $T$6 until either !Validator BWT7 = !Validator CD7 OR !Ships $T$6 = 0<o></o>
then<o></o>
If !Validator BX7 < !Validator CE7 <o></o>
then <o></o>
if !Ships $U$6 > 0 add 1 to !Validator BX7 and subtract 1 from !Ships $U$6 until either !Validator BX7 = !Validator CE7 OR !Ships $U$6 = 0<o></o>
then<o></o>
If !Validator BZ7 < !Validator CG7 <o></o>
then <o></o>
if !Ships $W$6 > 0 add 1 to !Validator BZ7 and subtract 1 from !Ships $W$6 until either !Validator BZ7 = !Validator CG7 OR !Ships $W$6 = 0<o></o>
then <o></o>
start again with !Validator BS8<o></o>
<o> </o>
notes<o></o>
<o> </o>
If !Validator BS7 is 0 or blank OR DG7 does not equal ‘@depot’ then do nothing<o></o>
At any other point where the value in !Ships = 0 OR the value in the two !Validator cells are equal do next<o></o>
The values mention for !Ship are fixed and won't change through the macro loop - i.e. even though the row in validator increments the row in ships never will<o></o>
As always any help greatly appreciated!