IF/Then Theory between two or more tabs.

  • Thread starter Thread starter ruaduck
  • Start date Start date
R

ruaduck

I have a different worksheet than the one i am going to describe. I'm just
going to make this one an example.

i would like to have my tab have all the information. But on my second (or
more) tab i want it to display specific information. Say i wanted it like a
calendar function

The bottom tabs would be Day(all info), 12 am, 1 am, 2 am etc.
In the Day tab i would have as headers:
Name, Date, Remarks, Time.

Then under those headers you would have the needed information. Say it
would be.

Beetlejuice, Monday, Call his name 3 times, 2 am.

So i was wondering if there was a way to make it so under the 2 am section
that anything in your Day list that is 2 am would auto show up in 2 am only
by entering in information into the Day tab area. And it would automatcially
fall under the headers of Name, Date, Remarks, Time in the 2 am tab.

If there is any way i would so love to know how. If not please let me know
so i can stop getting my hopes up. or if needing more info let me know. Thanks
 
Yes, it's possible to have what you want. You can setup a Worksheet_Change
macro in the Day sheet. Code written in that macro would look for a change
in, say, Column D, if that is the column that would hold the "2 am" entry.
I would strongly suggest that the cells in this Column D have Data
Validation so that the user would have to select a value from a specific
list. Once the user selects that value, the macro code would react and do
whatever you wanted. The macro below is one example that will do it. HTH
Otto
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Dest As Range
If Target.Count > 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Not Intersect(Target, Range("D:D")) Is Nothing And _
Target.Row > 1 Then
With Sheets(Target.Value)
Set Dest = .Range("A" & Rows.Count).End(xlUp).Offset(1)
Target.Offset(, -3).Resize(, 4).Copy
Dest.PasteSpecial xlPasteValues
End With
End If
End Sub
 
I should add that this macro must be placed in the Day sheet module. To
access that module, right-click on the sheet tab and select View Code.
Paste this macro into that module. "X" out of the module to return to your
sheet. Otto
 
Thank you i will try this.

Otto Moehrbach said:
I should add that this macro must be placed in the Day sheet module. To
access that module, right-click on the sheet tab and select View Code.
Paste this macro into that module. "X" out of the module to return to your
sheet. Otto
 
Back
Top