PDA

View Full Version : [SOLVED:] Excel loop



chrisstaines
07-02-2014, 04:56 AM
Hello,

I have been asked to look into automatting a form for work and I have very little knowledge of VBA and hoped this forum could provide some help.

I have a value in cell L8, which I have assigned to a variable in VBA to be used as a counter for a loop, I have this part in hand, and I can see the loop running.

However, within each iteration of the loop I need to update the number value held in cells M14 or M15 or M16, etc (according to size of loop) to that currently held in M13.


How can I best achieve this?

Many thanks in advance.

Chris

Bob Phillips
07-02-2014, 04:58 AM
No loop required



With Range("M13")

.Offset(Range("L8").Value, 0).Value = .Value
End With

chrisstaines
07-02-2014, 08:34 AM
Wow, that is a much neater solution than I anticipated. I see I have a lot to learn, thank you very much xld.

Zack Barresse
07-04-2014, 06:26 PM
Marked as Solved.