Solved

Combine Two Sheets

Posted on 2011-03-01
4
233 Views
Last Modified: 2012-06-21
I need to combine the Sheets 'Team Dashboard Wip' and 'New Layouts'..the issue is that they both have controls and some code. I get errors when I try. Using two sheets when it could be simplified would be preferable, right?
Here is what I would like:
Move the 'New Layouts' content into 'Team Dashboard WIP' and use the control at the top of 'Team Dashboard WIP' to select the person and the appropriate data.
dashboard-wipv2.xlsm
0
Comment
Question by:singleton2787
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35009606
Like this? Sample File Attached.

Sid

Code Used

Private Sub Worksheet_change(ByVal Target As Range)
    If Not Intersect(Target, Range("E5")) Is Nothing Then
        Dim acell As Range
        
        Set acell = Sheets("Graph Data Entry").Columns(1).Find(What:=Range("E5").Value, LookIn:=xlValues, _
        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)
    
        If Not acell Is Nothing Then
            Range("E9").Value = acell.Offset(2, 2).Value
            Range("E10").Value = acell.Offset(4, 2).Value
            Range("E11").Value = acell.Offset(6, 2).Value
            Range("E12").Value = acell.Offset(7, 2).Value
            Range("F9").Value = acell.Offset(2, 3).Value
            Range("F10").Value = acell.Offset(4, 3).Value
            Range("F11").Value = acell.Offset(6, 3).Value
            Range("F12").Value = acell.Offset(7, 3).Value
            Range("G9").Value = acell.Offset(2, 4).Value
            Range("G10").Value = acell.Offset(4, 4).Value
            Range("G11").Value = acell.Offset(6, 4).Value
            Range("G12").Value = acell.Offset(7, 4).Value
            Range("H9").Value = acell.Offset(2, 5).Value
            Range("H10").Value = acell.Offset(4, 5).Value
            Range("H11").Value = acell.Offset(6, 5).Value
            Range("H12").Value = acell.Offset(7, 5).Value
         
        End If
    ElseIf Not Intersect(Target, Range("E18")) Is Nothing Then
        Range("E21:E29").ClearContents
        For I = 1 To 100
            If Sheets("Data").Cells(1, I) = Range("E18").Value Then
                For J = 21 To 29
                    ActiveSheet.Cells(J, 5).Value = Sheets("Data").Cells(J - 19, I)
                Next J
                Exit For
            End If
        Next
    End If
End Sub

Open in new window

Dashboard-wip.xlsm
0
 

Author Comment

by:singleton2787
ID: 35009833
Almost!!
If we can just remove the control at E18 (the lower one) and just make E5 the control that displays all the data and graph, that would be optimal, thanks!!!
0
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 35009892
Like this? Sample File Attached.

Sid

Code Used

Dim acell As Range

Private Sub Worksheet_change(ByVal Target As Range)
    If Not Intersect(Target, Range("E5")) Is Nothing Then
        Set acell = Sheets("Graph Data Entry").Columns(1).Find(What:=Range("E5").Value, LookIn:=xlValues, _
        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)
    
        If Not acell Is Nothing Then
            Range("E9").Value = acell.Offset(2, 2).Value
            Range("E10").Value = acell.Offset(4, 2).Value
            Range("E11").Value = acell.Offset(6, 2).Value
            Range("E12").Value = acell.Offset(7, 2).Value
            Range("F9").Value = acell.Offset(2, 3).Value
            Range("F10").Value = acell.Offset(4, 3).Value
            Range("F11").Value = acell.Offset(6, 3).Value
            Range("F12").Value = acell.Offset(7, 3).Value
            Range("G9").Value = acell.Offset(2, 4).Value
            Range("G10").Value = acell.Offset(4, 4).Value
            Range("G11").Value = acell.Offset(6, 4).Value
            Range("G12").Value = acell.Offset(7, 4).Value
            Range("H9").Value = acell.Offset(2, 5).Value
            Range("H10").Value = acell.Offset(4, 5).Value
            Range("H11").Value = acell.Offset(6, 5).Value
            Range("H12").Value = acell.Offset(7, 5).Value
         
        End If
        Range("E21:E29").ClearContents
        For I = 1 To 100
            If InStr(1, Sheets("Data").Cells(1, I), Range("E5").Value, vbTextCompare) Then
                For J = 21 To 29
                    ActiveSheet.Cells(J, 5).Value = Sheets("Data").Cells(J - 19, I)
                Next J
                Exit For
            End If
        Next
    End If
End Sub

Open in new window

Dashboard-wip.xlsm
0
 

Author Closing Comment

by:singleton2787
ID: 35010941
You are the man!! Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question