PA HS Teacher
Well-known Member
- Joined
- Jul 17, 2004
- Messages
- 2,838
Thanks for the advice Aladin.
I forgot about index, that is much better than using indirect.
I forgot about index, that is much better than using indirect.
Sub test()
'some codelines
If True Then 'change to False when needed
'test codelines to turn on and off
End If
'some other codelines
End Sub
subtotal_offset.xls | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | name | frequency | list2 | |||
2 | barry | 5 | barry | |||
3 | phil | 1 | barry | |||
4 | steve | 3 | barry | |||
5 | gavin | 0 | barry | |||
6 | barry | |||||
7 | phil | |||||
8 | steve | |||||
9 | steve | |||||
10 | steve | |||||
11 | ||||||
Sheet1 |
In a similar vein....
=A1-DAY(A1)
a simple way to give the first day of the month of any date in A1.
I first saw this used here by Aladin (who else?)
it's a pitty this one died so early: perhaps the reason was you tried to keep it alive to strongly
something very simple about VBA
when I have some code which has a part I want to "turn on" and "turn off" for testing, it's tedious to comment (out) a bunch of lines
putting them between a "trivial" If ... End If makes the job quickly done
alternatively you can useCode:Sub test() 'some codelines If True Then 'change to False when needed 'test codelines to turn on and off End If 'some other codelines End Sub
If 1 = 1 Then 'If 1 = 0 Then
voilà
Erik