#1
|
|||
|
|||
How to use for loop in formula in VBA?
Code:
With Application.Worksheets("ClassroomSittingPlan") For x = 1 To 3 '''''''''''''''''''''''''''''''''''' .Cells(x, 1).Formula = "=Sum(B"&x&":C"&x&")" '''''''''''''''''''''''''''''''''''' Next x End With |
#2
|
|||
|
|||
Solved.
Code:
.Cells(x, 1).Formula = "=Sum(" & .Cells(x, 2).Address & ":" & .Cells(x, 3).Address & ")" |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I create slideshow that plays on loop? | Olwen | PowerPoint | 1 | 08-25-2011 11:55 AM |
music loop in powerpoint presentation | genoMU69 | PowerPoint | 1 | 06-15-2011 08:00 AM |
While loop not working right | Cbrehm | Excel Programming | 0 | 05-11-2011 11:05 AM |
Continuous Loop | cksm4 | Word | 6 | 01-06-2011 09:03 PM |
Outlook 2003 restart in a loop | Stegel | Outlook | 0 | 06-29-2007 12:34 PM |