Shift cells to the left
JLGWhiz,
Thanks for the quick response and answer to my question, works great.
Steve
"JLGWhiz" wrote:
Steve, sorry to keep changing this on you but you
do want something that works right, so this will do
the trick if you change the =Now() in "B3" to =TODAY().
The date in the trigger cell kept mismatching due to the
time reference. This tested OK and will only shift the cells
on the first activation on the same day.
Private Sub Worksheet_Activate() 'Shift range of cells on date change
If Worksheets(1).Cells(3, 2) < Worksheets(1).Cells(1, 11) Then
Worksheets(1).Range("B4:B9").Delete xlShiftToLeft
End If
x = Worksheets(1).Cells(3, 2).Value
Worksheets(1).Range("K1") = Format(x, "m/d/yy")
End Sub
If for some reason, it does continue to shift on each iteration
of the code on the same day, then the date mismatch is the
problem and you can play with the formatting until it works or
somebody gives you a better code set.
"Steve D." wrote:
Hi all. Below I have the following formulas in cells B3-F3. What I am trying
to do, is any data that I have in cell B4-F9, I would like that data to shift
to the left when the date changes in cell B3-F3.
B C D E F
3 =NOW() =NOW()+1 =NOW()+2 =NOW()+3 =NOW()+4
4
5
6
7
8
9
Thanks in advance for any help you might have.
Steve
|